diff options
Diffstat (limited to 'test/Analysis/ValueTracking')
-rw-r--r-- | test/Analysis/ValueTracking/memory-dereferenceable.ll | 14 | ||||
-rw-r--r-- | test/Analysis/ValueTracking/pr23011.ll | 15 |
2 files changed, 22 insertions, 7 deletions
diff --git a/test/Analysis/ValueTracking/memory-dereferenceable.ll b/test/Analysis/ValueTracking/memory-dereferenceable.ll index 1c55efc..51f9265 100644 --- a/test/Analysis/ValueTracking/memory-dereferenceable.ll +++ b/test/Analysis/ValueTracking/memory-dereferenceable.ll @@ -17,16 +17,16 @@ define void @test(i32 addrspace(1)* dereferenceable(8) %dparam) { ; CHECK: %relocate ; CHECK-NOT: %nparam entry: - %globalptr = getelementptr inbounds [6 x i8]* @globalstr, i32 0, i32 0 - %load1 = load i8* %globalptr + %globalptr = getelementptr inbounds [6 x i8], [6 x i8]* @globalstr, i32 0, i32 0 + %load1 = load i8, i8* %globalptr %alloca = alloca i1 - %load2 = load i1* %alloca - %load3 = load i32 addrspace(1)* %dparam + %load2 = load i1, i1* %alloca + %load3 = load i32, i32 addrspace(1)* %dparam %tok = tail call i32 (i1 ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_i1f(i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 addrspace(1)* %dparam) %relocate = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %tok, i32 4, i32 4) - %load4 = load i32 addrspace(1)* %relocate - %nparam = getelementptr i32 addrspace(1)* %dparam, i32 5 - %load5 = load i32 addrspace(1)* %nparam + %load4 = load i32, i32 addrspace(1)* %relocate + %nparam = getelementptr i32, i32 addrspace(1)* %dparam, i32 5 + %load5 = load i32, i32 addrspace(1)* %nparam ret void } diff --git a/test/Analysis/ValueTracking/pr23011.ll b/test/Analysis/ValueTracking/pr23011.ll new file mode 100644 index 0000000..9edc1c4 --- /dev/null +++ b/test/Analysis/ValueTracking/pr23011.ll @@ -0,0 +1,15 @@ +; RUN: opt -indvars -S < %s | FileCheck %s + +declare { i8, i1 } @llvm.smul.with.overflow.i8(i8, i8) nounwind readnone + +define i1 @test1(i8 %x) { + entry: +; CHECK-LABEL: @test1 + %rem = srem i8 %x, 15 + %t = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 %rem, i8 %rem) +; CHECK: %t = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 %rem, i8 %rem) +; CHECK: %obit = extractvalue { i8, i1 } %t, 1 +; CHECK: ret i1 %obit + %obit = extractvalue { i8, i1 } %t, 1 + ret i1 %obit +} |