24 lines
813 B
LLVM
24 lines
813 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc -mtriple=x86_64-apple-macosx10.12.0 < %s | FileCheck %s
|
|
|
|
; Ensure that when a bitcast is folded into a load, range metadata is invalidated
|
|
; if it does not match the new type.
|
|
|
|
define i1 @fold_bitcast_range_metadata(ptr %valptr) {
|
|
; CHECK-LABEL: fold_bitcast_range_metadata:
|
|
; CHECK: ## %bb.0: ## %start
|
|
; CHECK-NEXT: movdqa (%rdi), %xmm0
|
|
; CHECK-NEXT: pcmpeqb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
|
|
; CHECK-NEXT: pmovmskb %xmm0, %eax
|
|
; CHECK-NEXT: cmpl $65535, %eax ## imm = 0xFFFF
|
|
; CHECK-NEXT: sete %al
|
|
; CHECK-NEXT: retq
|
|
start:
|
|
%val = load i128, ptr %valptr, align 16, !range !0, !noundef !1
|
|
%bool = icmp eq i128 %val, 1
|
|
ret i1 %bool
|
|
}
|
|
|
|
!0 = !{i128 0, i128 3}
|
|
!1 = !{}
|