diff options
Diffstat (limited to 'test/Transforms/MemCpyOpt')
-rw-r--r-- | test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll | 4 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll | 4 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll | 12 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/align.ll | 8 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/atomic.ll | 6 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/callslot_deref.ll | 4 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/crash.ll | 32 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/form-memset.ll | 176 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/loadstore-sret.ll | 6 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/memcpy-to-memset.ll | 2 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/memcpy-undef.ll | 8 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/memcpy.ll | 10 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/memmove.ll | 8 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/smaller.ll | 10 | ||||
-rw-r--r-- | test/Transforms/MemCpyOpt/sret.ll | 12 |
15 files changed, 151 insertions, 151 deletions
diff --git a/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll b/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll index 00ac34d..f73addd 100644 --- a/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll +++ b/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll @@ -8,9 +8,9 @@ target triple = "i386-pc-linux-gnu" define internal fastcc void @initialize(%0* noalias nocapture sret %agg.result) nounwind { entry: - %agg.result.03 = getelementptr %0* %agg.result, i32 0, i32 0 + %agg.result.03 = getelementptr %0, %0* %agg.result, i32 0, i32 0 store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.03 - %agg.result.15 = getelementptr %0* %agg.result, i32 0, i32 1 + %agg.result.15 = getelementptr %0, %0* %agg.result, i32 0, i32 1 store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.15 ret void } diff --git a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll index 6982c8b..ffbb299 100644 --- a/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll +++ b/test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll @@ -14,8 +14,8 @@ entry: %a_i8 = bitcast %a* %a_var to i8* %b_i8 = bitcast %b* %b_var to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b_i8, i8* %a_i8, i32 4, i32 1, i1 false) - %tmp1 = getelementptr %b* %b_var, i32 0, i32 0 - %tmp2 = load float* %tmp1 + %tmp1 = getelementptr %b, %b* %b_var, i32 0, i32 0 + %tmp2 = load float, float* %tmp1 ret float %tmp2 } diff --git a/test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll b/test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll index 132966e..8e4a023 100644 --- a/test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll +++ b/test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll @@ -17,20 +17,20 @@ define i32 @foo() nounwind { call void @bar(%struct1* sret %x) nounwind ; CHECK: call void @bar(%struct1* sret %x) - %gepn1 = getelementptr inbounds %struct2* %y, i32 0, i32 0, i32 0 + %gepn1 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 0 store i32 0, i32* %gepn1, align 8 - %gepn2 = getelementptr inbounds %struct2* %y, i32 0, i32 0, i32 1 + %gepn2 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 1 store i32 0, i32* %gepn2, align 4 %bit1 = bitcast %struct1* %x to i64* %bit2 = bitcast %struct2* %y to i64* - %load = load i64* %bit1, align 8 + %load = load i64, i64* %bit1, align 8 store i64 %load, i64* %bit2, align 8 -; CHECK: %load = load i64* %bit1, align 8 +; CHECK: %load = load i64, i64* %bit1, align 8 ; CHECK: store i64 %load, i64* %bit2, align 8 - %gep1 = getelementptr %struct2* %y, i32 0, i32 0, i32 0 - %ret = load i32* %gep1 + %gep1 = getelementptr %struct2, %struct2* %y, i32 0, i32 0, i32 0 + %ret = load i32, i32* %gep1 ret i32 %ret } diff --git a/test/Transforms/MemCpyOpt/align.ll b/test/Transforms/MemCpyOpt/align.ll index 5d5bfbd..9074684 100644 --- a/test/Transforms/MemCpyOpt/align.ll +++ b/test/Transforms/MemCpyOpt/align.ll @@ -10,13 +10,13 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind define void @foo(i32* %p) { ; CHECK-LABEL: @foo( ; CHECK: call void @llvm.memset.p0i8.i64(i8* {{.*}}, i8 0, i64 16, i32 4, i1 false) - %a0 = getelementptr i32* %p, i64 0 + %a0 = getelementptr i32, i32* %p, i64 0 store i32 0, i32* %a0, align 4 - %a1 = getelementptr i32* %p, i64 1 + %a1 = getelementptr i32, i32* %p, i64 1 store i32 0, i32* %a1, align 16 - %a2 = getelementptr i32* %p, i64 2 + %a2 = getelementptr i32, i32* %p, i64 2 store i32 0, i32* %a2, align 4 - %a3 = getelementptr i32* %p, i64 3 + %a3 = getelementptr i32, i32* %p, i64 3 store i32 0, i32* %a3, align 4 ret void } diff --git a/test/Transforms/MemCpyOpt/atomic.ll b/test/Transforms/MemCpyOpt/atomic.ll index f351e67..5be6b15 100644 --- a/test/Transforms/MemCpyOpt/atomic.ll +++ b/test/Transforms/MemCpyOpt/atomic.ll @@ -16,9 +16,9 @@ define void @test1() nounwind uwtable ssp { %x = alloca [101 x i32], align 16 %bc = bitcast [101 x i32]* %x to i8* call void @llvm.memset.p0i8.i64(i8* %bc, i8 0, i64 400, i32 16, i1 false) - %gep1 = getelementptr inbounds [101 x i32]* %x, i32 0, i32 100 + %gep1 = getelementptr inbounds [101 x i32], [101 x i32]* %x, i32 0, i32 100 store atomic i32 0, i32* %gep1 unordered, align 4 - %gep2 = getelementptr inbounds [101 x i32]* %x, i32 0, i32 0 + %gep2 = getelementptr inbounds [101 x i32], [101 x i32]* %x, i32 0, i32 0 call void @otherf(i32* %gep2) ret void } @@ -33,7 +33,7 @@ define void @test2() nounwind uwtable ssp { %new = alloca i32 call void @otherf(i32* nocapture %old) store atomic i32 0, i32* @x unordered, align 4 - %v = load i32* %old + %v = load i32, i32* %old store i32 %v, i32* %new call void @otherf(i32* nocapture %new) ret void diff --git a/test/Transforms/MemCpyOpt/callslot_deref.ll b/test/Transforms/MemCpyOpt/callslot_deref.ll index 4d51552..a1f5ae1 100644 --- a/test/Transforms/MemCpyOpt/callslot_deref.ll +++ b/test/Transforms/MemCpyOpt/callslot_deref.ll @@ -10,7 +10,7 @@ define void @must_remove_memcpy(i8* noalias nocapture dereferenceable(4096) %dst ; CHECK: call void @llvm.memset.p0i8.i64 ; CHECK-NOT: call void @llvm.memcpy.p0i8.p0i8.i64 %src = alloca [4096 x i8], align 1 - %p = getelementptr inbounds [4096 x i8]* %src, i64 0, i64 0 + %p = getelementptr inbounds [4096 x i8], [4096 x i8]* %src, i64 0, i64 0 call void @llvm.memset.p0i8.i64(i8* %p, i8 0, i64 4096, i32 1, i1 false) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst, i8* %p, i64 4096, i32 1, i1 false) #2 ret void @@ -22,7 +22,7 @@ define void @must_not_remove_memcpy(i8* noalias nocapture dereferenceable(1024) ; CHECK: call void @llvm.memset.p0i8.i64 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64 %src = alloca [4096 x i8], align 1 - %p = getelementptr inbounds [4096 x i8]* %src, i64 0, i64 0 + %p = getelementptr inbounds [4096 x i8], [4096 x i8]* %src, i64 0, i64 0 call void @llvm.memset.p0i8.i64(i8* %p, i8 0, i64 4096, i32 1, i1 false) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst, i8* %p, i64 4096, i32 1, i1 false) #2 ret void diff --git a/test/Transforms/MemCpyOpt/crash.ll b/test/Transforms/MemCpyOpt/crash.ll index cc3a6b0..56757a6 100644 --- a/test/Transforms/MemCpyOpt/crash.ll +++ b/test/Transforms/MemCpyOpt/crash.ll @@ -9,37 +9,37 @@ target triple = "armv7-eabi" ; PR4882 define void @test1(%struct.bar* %this) { entry: - %0 = getelementptr inbounds %struct.bar* %this, i32 0, i32 0, i32 0, i32 0 + %0 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 0, i32 0, i32 0 store float 0.000000e+00, float* %0, align 4 - %1 = getelementptr inbounds %struct.bar* %this, i32 0, i32 0, i32 0, i32 1 + %1 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 0, i32 0, i32 1 store float 0.000000e+00, float* %1, align 4 - %2 = getelementptr inbounds %struct.bar* %this, i32 0, i32 0, i32 0, i32 2 + %2 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 0, i32 0, i32 2 store float 0.000000e+00, float* %2, align 4 - %3 = getelementptr inbounds %struct.bar* %this, i32 0, i32 0, i32 0, i32 3 + %3 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 0, i32 0, i32 3 store float 0.000000e+00, float* %3, align 4 - %4 = getelementptr inbounds %struct.bar* %this, i32 0, i32 1, i32 0, i32 0 + %4 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 1, i32 0, i32 0 store float 0.000000e+00, float* %4, align 4 - %5 = getelementptr inbounds %struct.bar* %this, i32 0, i32 1, i32 0, i32 1 + %5 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 1, i32 0, i32 1 store float 0.000000e+00, float* %5, align 4 - %6 = getelementptr inbounds %struct.bar* %this, i32 0, i32 1, i32 0, i32 2 + %6 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 1, i32 0, i32 2 store float 0.000000e+00, float* %6, align 4 - %7 = getelementptr inbounds %struct.bar* %this, i32 0, i32 1, i32 0, i32 3 + %7 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 1, i32 0, i32 3 store float 0.000000e+00, float* %7, align 4 - %8 = getelementptr inbounds %struct.bar* %this, i32 0, i32 3, i32 0, i32 1 + %8 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 3, i32 0, i32 1 store float 0.000000e+00, float* %8, align 4 - %9 = getelementptr inbounds %struct.bar* %this, i32 0, i32 3, i32 0, i32 2 + %9 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 3, i32 0, i32 2 store float 0.000000e+00, float* %9, align 4 - %10 = getelementptr inbounds %struct.bar* %this, i32 0, i32 3, i32 0, i32 3 + %10 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 3, i32 0, i32 3 store float 0.000000e+00, float* %10, align 4 - %11 = getelementptr inbounds %struct.bar* %this, i32 0, i32 4, i32 0, i32 0 + %11 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 4, i32 0, i32 0 store float 0.000000e+00, float* %11, align 4 - %12 = getelementptr inbounds %struct.bar* %this, i32 0, i32 4, i32 0, i32 1 + %12 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 4, i32 0, i32 1 store float 0.000000e+00, float* %12, align 4 - %13 = getelementptr inbounds %struct.bar* %this, i32 0, i32 4, i32 0, i32 2 + %13 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 4, i32 0, i32 2 store float 0.000000e+00, float* %13, align 4 - %14 = getelementptr inbounds %struct.bar* %this, i32 0, i32 4, i32 0, i32 3 + %14 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 4, i32 0, i32 3 store float 0.000000e+00, float* %14, align 4 - %15 = getelementptr inbounds %struct.bar* %this, i32 0, i32 5 + %15 = getelementptr inbounds %struct.bar, %struct.bar* %this, i32 0, i32 5 store float 0.000000e+00, float* %15, align 4 unreachable } diff --git a/test/Transforms/MemCpyOpt/form-memset.ll b/test/Transforms/MemCpyOpt/form-memset.ll index 0a40943..f54406f 100644 --- a/test/Transforms/MemCpyOpt/form-memset.ll +++ b/test/Transforms/MemCpyOpt/form-memset.ll @@ -8,43 +8,43 @@ target triple = "i386-apple-darwin8" define void @test1(i8 signext %c) nounwind { entry: %x = alloca [19 x i8] ; <[19 x i8]*> [#uses=20] - %tmp = getelementptr [19 x i8]* %x, i32 0, i32 0 ; <i8*> [#uses=1] + %tmp = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 0 ; <i8*> [#uses=1] store i8 %c, i8* %tmp, align 1 - %tmp5 = getelementptr [19 x i8]* %x, i32 0, i32 1 ; <i8*> [#uses=1] + %tmp5 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 1 ; <i8*> [#uses=1] store i8 %c, i8* %tmp5, align 1 - %tmp9 = getelementptr [19 x i8]* %x, i32 0, i32 2 ; <i8*> [#uses=1] + %tmp9 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 2 ; <i8*> [#uses=1] store i8 %c, i8* %tmp9, align 1 - %tmp13 = getelementptr [19 x i8]* %x, i32 0, i32 3 ; <i8*> [#uses=1] + %tmp13 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 3 ; <i8*> [#uses=1] store i8 %c, i8* %tmp13, align 1 - %tmp17 = getelementptr [19 x i8]* %x, i32 0, i32 4 ; <i8*> [#uses=1] + %tmp17 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 4 ; <i8*> [#uses=1] store i8 %c, i8* %tmp17, align 1 - %tmp21 = getelementptr [19 x i8]* %x, i32 0, i32 5 ; <i8*> [#uses=1] + %tmp21 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 5 ; <i8*> [#uses=1] store i8 %c, i8* %tmp21, align 1 - %tmp25 = getelementptr [19 x i8]* %x, i32 0, i32 6 ; <i8*> [#uses=1] + %tmp25 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 6 ; <i8*> [#uses=1] store i8 %c, i8* %tmp25, align 1 - %tmp29 = getelementptr [19 x i8]* %x, i32 0, i32 7 ; <i8*> [#uses=1] + %tmp29 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 7 ; <i8*> [#uses=1] store i8 %c, i8* %tmp29, align 1 - %tmp33 = getelementptr [19 x i8]* %x, i32 0, i32 8 ; <i8*> [#uses=1] + %tmp33 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 8 ; <i8*> [#uses=1] store i8 %c, i8* %tmp33, align 1 - %tmp37 = getelementptr [19 x i8]* %x, i32 0, i32 9 ; <i8*> [#uses=1] + %tmp37 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 9 ; <i8*> [#uses=1] store i8 %c, i8* %tmp37, align 1 - %tmp41 = getelementptr [19 x i8]* %x, i32 0, i32 10 ; <i8*> [#uses=1] + %tmp41 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 10 ; <i8*> [#uses=1] store i8 %c, i8* %tmp41, align 1 - %tmp45 = getelementptr [19 x i8]* %x, i32 0, i32 11 ; <i8*> [#uses=1] + %tmp45 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 11 ; <i8*> [#uses=1] store i8 %c, i8* %tmp45, align 1 - %tmp49 = getelementptr [19 x i8]* %x, i32 0, i32 12 ; <i8*> [#uses=1] + %tmp49 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 12 ; <i8*> [#uses=1] store i8 %c, i8* %tmp49, align 1 - %tmp53 = getelementptr [19 x i8]* %x, i32 0, i32 13 ; <i8*> [#uses=1] + %tmp53 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 13 ; <i8*> [#uses=1] store i8 %c, i8* %tmp53, align 1 - %tmp57 = getelementptr [19 x i8]* %x, i32 0, i32 14 ; <i8*> [#uses=1] + %tmp57 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 14 ; <i8*> [#uses=1] store i8 %c, i8* %tmp57, align 1 - %tmp61 = getelementptr [19 x i8]* %x, i32 0, i32 15 ; <i8*> [#uses=1] + %tmp61 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 15 ; <i8*> [#uses=1] store i8 %c, i8* %tmp61, align 1 - %tmp65 = getelementptr [19 x i8]* %x, i32 0, i32 16 ; <i8*> [#uses=1] + %tmp65 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 16 ; <i8*> [#uses=1] store i8 %c, i8* %tmp65, align 1 - %tmp69 = getelementptr [19 x i8]* %x, i32 0, i32 17 ; <i8*> [#uses=1] + %tmp69 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 17 ; <i8*> [#uses=1] store i8 %c, i8* %tmp69, align 1 - %tmp73 = getelementptr [19 x i8]* %x, i32 0, i32 18 ; <i8*> [#uses=1] + %tmp73 = getelementptr [19 x i8], [19 x i8]* %x, i32 0, i32 18 ; <i8*> [#uses=1] store i8 %c, i8* %tmp73, align 1 %tmp76 = call i32 (...)* @bar( [19 x i8]* %x ) nounwind ret void @@ -65,88 +65,88 @@ entry: %ref_idx = alloca [8 x i8] ; <[8 x i8]*> [#uses=8] %left_mvd = alloca [8 x %struct.MV] ; <[8 x %struct.MV]*> [#uses=17] %up_mvd = alloca [8 x %struct.MV] ; <[8 x %struct.MV]*> [#uses=17] - %tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] + %tmp20 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] store i8 -1, i8* %tmp20, align 1 - %tmp23 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 6 ; <i8*> [#uses=1] + %tmp23 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 6 ; <i8*> [#uses=1] store i8 -1, i8* %tmp23, align 1 - %tmp26 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 5 ; <i8*> [#uses=1] + %tmp26 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 5 ; <i8*> [#uses=1] store i8 -1, i8* %tmp26, align 1 - %tmp29 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 4 ; <i8*> [#uses=1] + %tmp29 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 4 ; <i8*> [#uses=1] store i8 -1, i8* %tmp29, align 1 - %tmp32 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 3 ; <i8*> [#uses=1] + %tmp32 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 3 ; <i8*> [#uses=1] store i8 -1, i8* %tmp32, align 1 - %tmp35 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 2 ; <i8*> [#uses=1] + %tmp35 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 2 ; <i8*> [#uses=1] store i8 -1, i8* %tmp35, align 1 - %tmp38 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 1 ; <i8*> [#uses=1] + %tmp38 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 1 ; <i8*> [#uses=1] store i8 -1, i8* %tmp38, align 1 - %tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] + %tmp41 = getelementptr [8 x i8], [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] store i8 -1, i8* %tmp41, align 1 - %tmp43 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 7, i32 0 ; <i16*> [#uses=1] + %tmp43 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 7, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp43, align 2 - %tmp46 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 7, i32 1 ; <i16*> [#uses=1] + %tmp46 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 7, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp46, align 2 - %tmp57 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 6, i32 0 ; <i16*> [#uses=1] + %tmp57 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 6, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp57, align 2 - %tmp60 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 6, i32 1 ; <i16*> [#uses=1] + %tmp60 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 6, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp60, align 2 - %tmp71 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 5, i32 0 ; <i16*> [#uses=1] + %tmp71 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 5, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp71, align 2 - %tmp74 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 5, i32 1 ; <i16*> [#uses=1] + %tmp74 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 5, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp74, align 2 - %tmp85 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 4, i32 0 ; <i16*> [#uses=1] + %tmp85 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 4, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp85, align 2 - %tmp88 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 4, i32 1 ; <i16*> [#uses=1] + %tmp88 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 4, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp88, align 2 - %tmp99 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 3, i32 0 ; <i16*> [#uses=1] + %tmp99 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 3, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp99, align 2 - %tmp102 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 3, i32 1 ; <i16*> [#uses=1] + %tmp102 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 3, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp102, align 2 - %tmp113 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 2, i32 0 ; <i16*> [#uses=1] + %tmp113 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 2, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp113, align 2 - %tmp116 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 2, i32 1 ; <i16*> [#uses=1] + %tmp116 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 2, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp116, align 2 - %tmp127 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 1, i32 0 ; <i16*> [#uses=1] + %tmp127 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 1, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp127, align 2 - %tmp130 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 1, i32 1 ; <i16*> [#uses=1] + %tmp130 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 1, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp130, align 2 - %tmp141 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 0, i32 0 ; <i16*> [#uses=1] + %tmp141 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 0, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp141, align 8 - %tmp144 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 0, i32 1 ; <i16*> [#uses=1] + %tmp144 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 0, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp144, align 2 - %tmp148 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 7, i32 0 ; <i16*> [#uses=1] + %tmp148 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 7, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp148, align 2 - %tmp151 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 7, i32 1 ; <i16*> [#uses=1] + %tmp151 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 7, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp151, align 2 - %tmp162 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 6, i32 0 ; <i16*> [#uses=1] + %tmp162 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 6, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp162, align 2 - %tmp165 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 6, i32 1 ; <i16*> [#uses=1] + %tmp165 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 6, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp165, align 2 - %tmp176 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 5, i32 0 ; <i16*> [#uses=1] + %tmp176 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 5, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp176, align 2 - %tmp179 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 5, i32 1 ; <i16*> [#uses=1] + %tmp179 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 5, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp179, align 2 - %tmp190 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 4, i32 0 ; <i16*> [#uses=1] + %tmp190 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 4, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp190, align 2 - %tmp193 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 4, i32 1 ; <i16*> [#uses=1] + %tmp193 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 4, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp193, align 2 - %tmp204 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 3, i32 0 ; <i16*> [#uses=1] + %tmp204 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 3, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp204, align 2 - %tmp207 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 3, i32 1 ; <i16*> [#uses=1] + %tmp207 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 3, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp207, align 2 - %tmp218 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 2, i32 0 ; <i16*> [#uses=1] + %tmp218 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 2, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp218, align 2 - %tmp221 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 2, i32 1 ; <i16*> [#uses=1] + %tmp221 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 2, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp221, align 2 - %tmp232 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 1, i32 0 ; <i16*> [#uses=1] + %tmp232 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 1, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp232, align 2 - %tmp235 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 1, i32 1 ; <i16*> [#uses=1] + %tmp235 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 1, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp235, align 2 - %tmp246 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 0, i32 0 ; <i16*> [#uses=1] + %tmp246 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 0, i32 0 ; <i16*> [#uses=1] store i16 0, i16* %tmp246, align 8 - %tmp249 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 0, i32 1 ; <i16*> [#uses=1] + %tmp249 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 0, i32 1 ; <i16*> [#uses=1] store i16 0, i16* %tmp249, align 2 - %up_mvd252 = getelementptr [8 x %struct.MV]* %up_mvd, i32 0, i32 0 ; <%struct.MV*> [#uses=1] - %left_mvd253 = getelementptr [8 x %struct.MV]* %left_mvd, i32 0, i32 0 ; <%struct.MV*> [#uses=1] + %up_mvd252 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %up_mvd, i32 0, i32 0 ; <%struct.MV*> [#uses=1] + %left_mvd253 = getelementptr [8 x %struct.MV], [8 x %struct.MV]* %left_mvd, i32 0, i32 0 ; <%struct.MV*> [#uses=1] call void @foo( %struct.MV* %up_mvd252, %struct.MV* %left_mvd253, i8* %tmp41 ) nounwind ret void @@ -167,9 +167,9 @@ declare void @foo(%struct.MV*, %struct.MV*, i8*) ; Store followed by memset. define void @test3(i32* nocapture %P) nounwind ssp { entry: - %arrayidx = getelementptr inbounds i32* %P, i64 1 + %arrayidx = getelementptr inbounds i32, i32* %P, i64 1 store i32 0, i32* %arrayidx, align 4 - %add.ptr = getelementptr inbounds i32* %P, i64 2 + %add.ptr = getelementptr inbounds i32, i32* %P, i64 2 %0 = bitcast i32* %add.ptr to i8* tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false) ret void @@ -182,7 +182,7 @@ entry: define void @test4(i32* nocapture %P) nounwind ssp { entry: store i32 0, i32* %P, align 4 - %add.ptr = getelementptr inbounds i32* %P, i64 1 + %add.ptr = getelementptr inbounds i32, i32* %P, i64 1 %0 = bitcast i32* %add.ptr to i8* tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false) ret void @@ -196,10 +196,10 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind ; Memset followed by store. define void @test5(i32* nocapture %P) nounwind ssp { entry: - %add.ptr = getelementptr inbounds i32* %P, i64 2 + %add.ptr = getelementptr inbounds i32, i32* %P, i64 2 %0 = bitcast i32* %add.ptr to i8* tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 11, i32 1, i1 false) - %arrayidx = getelementptr inbounds i32* %P, i64 1 + %arrayidx = getelementptr inbounds i32, i32* %P, i64 1 store i32 0, i32* %arrayidx, align 4 ret void ; CHECK-LABEL: @test5( @@ -212,7 +212,7 @@ define void @test6(i32* nocapture %P) nounwind ssp { entry: %0 = bitcast i32* %P to i8* tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 12, i32 1, i1 false) - %add.ptr = getelementptr inbounds i32* %P, i64 3 + %add.ptr = getelementptr inbounds i32, i32* %P, i64 3 %1 = bitcast i32* %add.ptr to i8* tail call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 12, i32 1, i1 false) ret void @@ -224,13 +224,13 @@ entry: ; rdar://9892684 define void @test7(i32* nocapture %c) nounwind optsize { store i32 -1, i32* %c, align 4 - %1 = getelementptr inbounds i32* %c, i32 1 + %1 = getelementptr inbounds i32, i32* %c, i32 1 store i32 -1, i32* %1, align 4 - %2 = getelementptr inbounds i32* %c, i32 2 + %2 = getelementptr inbounds i32, i32* %c, i32 2 store i32 -1, i32* %2, align 4 - %3 = getelementptr inbounds i32* %c, i32 3 + %3 = getelementptr inbounds i32, i32* %c, i32 3 store i32 -1, i32* %3, align 4 - %4 = getelementptr inbounds i32* %c, i32 4 + %4 = getelementptr inbounds i32, i32* %c, i32 4 store i32 -1, i32* %4, align 4 ; CHECK-LABEL: @test7( ; CHECK: call void @llvm.memset.p0i8.i64(i8* %5, i8 -1, i64 20, i32 4, i1 false) @@ -253,21 +253,21 @@ entry: define void @test9() nounwind { store i8 -1, i8* bitcast ([16 x i64]* @test9buf to i8*), align 16 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 1), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 2), align 2 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 3), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 4), align 4 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 5), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 6), align 2 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 7), align 1 - store i8 -1, i8* bitcast (i64* getelementptr inbounds ([16 x i64]* @test9buf, i64 0, i64 1) to i8*), align 8 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 9), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 10), align 2 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 11), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 12), align 4 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 13), align 1 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 14), align 2 - store i8 -1, i8* getelementptr (i8* bitcast ([16 x i64]* @test9buf to i8*), i64 15), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 1), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 2), align 2 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 3), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 4), align 4 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 5), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 6), align 2 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 7), align 1 + store i8 -1, i8* bitcast (i64* getelementptr inbounds ([16 x i64], [16 x i64]* @test9buf, i64 0, i64 1) to i8*), align 8 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 9), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 10), align 2 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 11), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 12), align 4 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 13), align 1 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 14), align 2 + store i8 -1, i8* getelementptr (i8, i8* bitcast ([16 x i64]* @test9buf to i8*), i64 15), align 1 ret void ; CHECK-LABEL: @test9( ; CHECK: call void @llvm.memset.p0i8.i64(i8* bitcast ([16 x i64]* @test9buf to i8*), i8 -1, i64 16, i32 16, i1 false) @@ -288,10 +288,10 @@ define void @test10(i8* nocapture %P) nounwind { ; Memset followed by odd store. define void @test11(i32* nocapture %P) nounwind ssp { entry: - %add.ptr = getelementptr inbounds i32* %P, i64 3 + %add.ptr = getelementptr inbounds i32, i32* %P, i64 3 %0 = bitcast i32* %add.ptr to i8* tail call void @llvm.memset.p0i8.i64(i8* %0, i8 1, i64 11, i32 1, i1 false) - %arrayidx = getelementptr inbounds i32* %P, i64 0 + %arrayidx = getelementptr inbounds i32, i32* %P, i64 0 %arrayidx.cast = bitcast i32* %arrayidx to i96* store i96 310698676526526814092329217, i96* %arrayidx.cast, align 4 ret void diff --git a/test/Transforms/MemCpyOpt/loadstore-sret.ll b/test/Transforms/MemCpyOpt/loadstore-sret.ll index d4a700d..55cbe59 100644 --- a/test/Transforms/MemCpyOpt/loadstore-sret.ll +++ b/test/Transforms/MemCpyOpt/loadstore-sret.ll @@ -12,10 +12,10 @@ _ZNSt8auto_ptrIiED1Ev.exit: %temp.lvalue = alloca %"class.std::auto_ptr", align 8 ; CHECK: call void @_Z3barv(%"class.std::auto_ptr"* sret %agg.result) call void @_Z3barv(%"class.std::auto_ptr"* sret %temp.lvalue) - %tmp.i.i = getelementptr inbounds %"class.std::auto_ptr"* %temp.lvalue, i64 0, i32 0 + %tmp.i.i = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %temp.lvalue, i64 0, i32 0 ; CHECK-NOT: load - %tmp2.i.i = load i32** %tmp.i.i, align 8 - %tmp.i.i4 = getelementptr inbounds %"class.std::auto_ptr"* %agg.result, i64 0, i32 0 + %tmp2.i.i = load i32*, i32** %tmp.i.i, align 8 + %tmp.i.i4 = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %agg.result, i64 0, i32 0 ; CHECK-NOT: store store i32* %tmp2.i.i, i32** %tmp.i.i4, align 8 ; CHECK: ret void diff --git a/test/Transforms/MemCpyOpt/memcpy-to-memset.ll b/test/Transforms/MemCpyOpt/memcpy-to-memset.ll index 8409de7..fd8b93c 100644 --- a/test/Transforms/MemCpyOpt/memcpy-to-memset.ll +++ b/test/Transforms/MemCpyOpt/memcpy-to-memset.ll @@ -9,7 +9,7 @@ define void @test1() nounwind { %arr = alloca [3 x i32], align 4 %arr_i8 = bitcast [3 x i32]* %arr to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %arr_i8, i8* bitcast ([3 x i32]* @cst to i8*), i64 12, i32 4, i1 false) - %arraydecay = getelementptr inbounds [3 x i32]* %arr, i64 0, i64 0 + %arraydecay = getelementptr inbounds [3 x i32], [3 x i32]* %arr, i64 0, i64 0 call void @foo(i32* %arraydecay) nounwind ret void ; CHECK-LABEL: @test1( diff --git a/test/Transforms/MemCpyOpt/memcpy-undef.ll b/test/Transforms/MemCpyOpt/memcpy-undef.ll index 663b8dc..c75d020 100644 --- a/test/Transforms/MemCpyOpt/memcpy-undef.ll +++ b/test/Transforms/MemCpyOpt/memcpy-undef.ll @@ -7,12 +7,12 @@ target triple = "x86_64-apple-macosx10.8.0" define i32 @test1(%struct.foo* nocapture %foobie) nounwind noinline ssp uwtable { %bletch.sroa.1 = alloca [7 x i8], align 1 - %1 = getelementptr inbounds %struct.foo* %foobie, i64 0, i32 0 + %1 = getelementptr inbounds %struct.foo, %struct.foo* %foobie, i64 0, i32 0 store i8 98, i8* %1, align 4 - %2 = getelementptr inbounds %struct.foo* %foobie, i64 0, i32 1, i64 0 - %3 = getelementptr inbounds [7 x i8]* %bletch.sroa.1, i64 0, i64 0 + %2 = getelementptr inbounds %struct.foo, %struct.foo* %foobie, i64 0, i32 1, i64 0 + %3 = getelementptr inbounds [7 x i8], [7 x i8]* %bletch.sroa.1, i64 0, i64 0 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %3, i64 7, i32 1, i1 false) - %4 = getelementptr inbounds %struct.foo* %foobie, i64 0, i32 2 + %4 = getelementptr inbounds %struct.foo, %struct.foo* %foobie, i64 0, i32 2 store i32 20, i32* %4, align 4 ret i32 undef diff --git a/test/Transforms/MemCpyOpt/memcpy.ll b/test/Transforms/MemCpyOpt/memcpy.ll index ee04f19..7318474 100644 --- a/test/Transforms/MemCpyOpt/memcpy.ll +++ b/test/Transforms/MemCpyOpt/memcpy.ll @@ -93,7 +93,7 @@ entry: %y = alloca %struct.S, align 16 %tmp = bitcast %struct.S* %y to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* bitcast (%struct.S* @sS to i8*), i64 32, i32 16, i1 false) - %a = getelementptr %struct.S* %y, i64 0, i32 1, i64 0 + %a = getelementptr %struct.S, %struct.S* %y, i64 0, i32 1, i64 0 store i8 4, i8* %a call void @test5a(%struct.S* align 16 byval %y) ret i32 0 @@ -139,10 +139,10 @@ define void @test8() { ; CHECK: test8 ; CHECK-NOT: memcpy %A = tail call i8* @malloc(i32 10) - %B = getelementptr inbounds i8* %A, i64 2 - tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %B, i8* getelementptr inbounds ([7 x i8]* @test8.str, i64 0, i64 0), i32 7, i32 1, i1 false) + %B = getelementptr inbounds i8, i8* %A, i64 2 + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %B, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @test8.str, i64 0, i64 0), i32 7, i32 1, i1 false) %C = tail call i8* @malloc(i32 10) - %D = getelementptr inbounds i8* %C, i64 2 + %D = getelementptr inbounds i8, i8* %C, i64 2 tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %D, i8* %B, i32 7, i32 1, i1 false) ret void ; CHECK: ret void @@ -196,7 +196,7 @@ define void @test10(%opaque* noalias nocapture sret %x, i32 %y) { %a = alloca i32, align 4 store i32 %y, i32* %a call void @foo(i32* noalias nocapture %a) - %c = load i32* %a + %c = load i32, i32* %a %d = bitcast %opaque* %x to i32* store i32 %c, i32* %d ret void diff --git a/test/Transforms/MemCpyOpt/memmove.ll b/test/Transforms/MemCpyOpt/memmove.ll index 2057760..1af85a1 100644 --- a/test/Transforms/MemCpyOpt/memmove.ll +++ b/test/Transforms/MemCpyOpt/memmove.ll @@ -11,9 +11,9 @@ entry: ; CHECK-LABEL: @test1( ; CHECK: call void @llvm.memcpy - %malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i8* getelementptr (i8* null, i32 1) to i64), i64 13) to i32)) + %malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64), i64 13) to i32)) %call3 = bitcast i8* %malloccall to [13 x i8]* - %call3.sub = getelementptr inbounds [13 x i8]* %call3, i64 0, i64 0 + %call3.sub = getelementptr inbounds [13 x i8], [13 x i8]* %call3, i64 0, i64 0 tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %call3.sub, i8* %src, i64 13, i32 1, i1 false) ret i8* %call3.sub } @@ -24,7 +24,7 @@ define void @test2(i8* %P) nounwind { entry: ; CHECK-LABEL: @test2( ; CHECK: call void @llvm.memcpy - %add.ptr = getelementptr i8* %P, i64 16 + %add.ptr = getelementptr i8, i8* %P, i64 16 tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %P, i8* %add.ptr, i64 16, i32 1, i1 false) ret void } @@ -34,7 +34,7 @@ define void @test3(i8* %P) nounwind { entry: ; CHECK-LABEL: @test3( ; CHECK: call void @llvm.memmove - %add.ptr = getelementptr i8* %P, i64 16 + %add.ptr = getelementptr i8, i8* %P, i64 16 tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %P, i8* %add.ptr, i64 17, i32 1, i1 false) ret void } diff --git a/test/Transforms/MemCpyOpt/smaller.ll b/test/Transforms/MemCpyOpt/smaller.ll index 1d35582..8f6cafa 100644 --- a/test/Transforms/MemCpyOpt/smaller.ll +++ b/test/Transforms/MemCpyOpt/smaller.ll @@ -4,7 +4,7 @@ ; Memcpyopt shouldn't optimize the second memcpy using the first ; because the first has a smaller size. -; CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.s* @cell, i32 0, i32 0, i32 0), i32 16, i32 4, i1 false) +; CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.s, %struct.s* @cell, i32 0, i32 0, i32 0), i32 16, i32 4, i1 false) target datalayout = "e-p:32:32:32" @@ -19,10 +19,10 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, define void @foo() nounwind { entry: %agg.tmp = alloca %struct.s, align 4 - store i32 99, i32* getelementptr inbounds (%struct.s* @cell, i32 0, i32 1), align 4 - call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.s* @cell, i32 0, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i32 11, i32 1, i1 false) - %tmp = getelementptr inbounds %struct.s* %agg.tmp, i32 0, i32 0, i32 0 - call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.s* @cell, i32 0, i32 0, i32 0), i32 16, i32 4, i1 false) + store i32 99, i32* getelementptr inbounds (%struct.s, %struct.s* @cell, i32 0, i32 1), align 4 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.s, %struct.s* @cell, i32 0, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i32 11, i32 1, i1 false) + %tmp = getelementptr inbounds %struct.s, %struct.s* %agg.tmp, i32 0, i32 0, i32 0 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.s, %struct.s* @cell, i32 0, i32 0, i32 0), i32 16, i32 4, i1 false) call void @check(%struct.s* byval %agg.tmp) ret void } diff --git a/test/Transforms/MemCpyOpt/sret.ll b/test/Transforms/MemCpyOpt/sret.ll index bfe5e0f..34ba4c4 100644 --- a/test/Transforms/MemCpyOpt/sret.ll +++ b/test/Transforms/MemCpyOpt/sret.ll @@ -9,13 +9,13 @@ define void @ccosl(%0* noalias sret %agg.result, %0* byval align 8 %z) nounwind entry: %iz = alloca %0 %memtmp = alloca %0, align 16 - %tmp1 = getelementptr %0* %z, i32 0, i32 1 - %tmp2 = load x86_fp80* %tmp1, align 16 + %tmp1 = getelementptr %0, %0* %z, i32 0, i32 1 + %tmp2 = load x86_fp80, x86_fp80* %tmp1, align 16 %tmp3 = fsub x86_fp80 0xK80000000000000000000, %tmp2 - %tmp4 = getelementptr %0* %iz, i32 0, i32 1 - %real = getelementptr %0* %iz, i32 0, i32 0 - %tmp7 = getelementptr %0* %z, i32 0, i32 0 - %tmp8 = load x86_fp80* %tmp7, align 16 + %tmp4 = getelementptr %0, %0* %iz, i32 0, i32 1 + %real = getelementptr %0, %0* %iz, i32 0, i32 0 + %tmp7 = getelementptr %0, %0* %z, i32 0, i32 0 + %tmp8 = load x86_fp80, x86_fp80* %tmp7, align 16 store x86_fp80 %tmp3, x86_fp80* %real, align 16 store x86_fp80 %tmp8, x86_fp80* %tmp4, align 16 call void @ccoshl(%0* noalias sret %memtmp, %0* byval align 8 %iz) nounwind |