aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GVN
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-04-08 08:55:49 -0700
committerPirama Arumuga Nainar <pirama@google.com>2015-04-09 15:04:38 -0700
commit4c5e43da7792f75567b693105cc53e3f1992ad98 (patch)
tree1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Transforms/GVN
parentc75239e6119d0f9a74c57099d91cbc9bde56bf33 (diff)
downloadexternal_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.zip
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.gz
external_llvm-4c5e43da7792f75567b693105cc53e3f1992ad98.tar.bz2
Update aosp/master llvm for rebase to r233350
Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
Diffstat (limited to 'test/Transforms/GVN')
-rw-r--r--test/Transforms/GVN/2007-07-25-DominatedLoop.ll4
-rw-r--r--test/Transforms/GVN/2007-07-25-InfiniteLoop.ll2
-rw-r--r--test/Transforms/GVN/2007-07-25-Loop.ll2
-rw-r--r--test/Transforms/GVN/2007-07-25-NestedLoop.ll12
-rw-r--r--test/Transforms/GVN/2007-07-25-SinglePredecessor.ll6
-rw-r--r--test/Transforms/GVN/2007-07-26-InterlockingLoops.ll6
-rw-r--r--test/Transforms/GVN/2007-07-26-NonRedundant.ll2
-rw-r--r--test/Transforms/GVN/2007-07-26-PhiErasure.ll4
-rw-r--r--test/Transforms/GVN/2007-07-30-PredIDom.ll2
-rw-r--r--test/Transforms/GVN/2007-07-31-NoDomInherit.ll124
-rw-r--r--test/Transforms/GVN/2007-07-31-RedundantPhi.ll2
-rw-r--r--test/Transforms/GVN/2008-02-12-UndefLoad.ll6
-rw-r--r--test/Transforms/GVN/2008-02-13-NewPHI.ll4
-rw-r--r--test/Transforms/GVN/2008-07-02-Unreachable.ll4
-rw-r--r--test/Transforms/GVN/2008-12-09-SelfRemove.ll6
-rw-r--r--test/Transforms/GVN/2008-12-12-RLE-Crash.ll8
-rw-r--r--test/Transforms/GVN/2008-12-14-rle-reanalyze.ll6
-rw-r--r--test/Transforms/GVN/2008-12-15-CacheVisited.ll8
-rw-r--r--test/Transforms/GVN/2009-01-21-SortInvalidation.ll2
-rw-r--r--test/Transforms/GVN/2009-01-22-SortInvalidation.ll10
-rw-r--r--test/Transforms/GVN/2009-02-17-LoadPRECrash.ll36
-rw-r--r--test/Transforms/GVN/2009-06-17-InvalidPRE.ll26
-rw-r--r--test/Transforms/GVN/2009-07-13-MemDepSortFail.ll4
-rw-r--r--test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll6
-rw-r--r--test/Transforms/GVN/2010-03-31-RedundantPHIs.ll4
-rw-r--r--test/Transforms/GVN/2010-05-08-OneBit.ll6
-rw-r--r--test/Transforms/GVN/2011-04-27-phioperands.ll4
-rw-r--r--test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll18
-rw-r--r--test/Transforms/GVN/MemdepMiscompile.ll8
-rw-r--r--test/Transforms/GVN/atomic.ll92
-rw-r--r--test/Transforms/GVN/calloc-load-removal.ll4
-rw-r--r--test/Transforms/GVN/calls-readonly.ll2
-rw-r--r--test/Transforms/GVN/cond_br.ll8
-rw-r--r--test/Transforms/GVN/cond_br2.ll34
-rw-r--r--test/Transforms/GVN/condprop.ll14
-rw-r--r--test/Transforms/GVN/crash-no-aa.ll6
-rw-r--r--test/Transforms/GVN/crash.ll52
-rw-r--r--test/Transforms/GVN/invariant-load.ll68
-rw-r--r--test/Transforms/GVN/lifetime-simple.ll4
-rw-r--r--test/Transforms/GVN/load-constant-mem.ll6
-rw-r--r--test/Transforms/GVN/load-from-unreachable-predecessor.ll6
-rw-r--r--test/Transforms/GVN/load-pre-align.ll4
-rw-r--r--test/Transforms/GVN/load-pre-licm.ll8
-rw-r--r--test/Transforms/GVN/load-pre-nonlocal.ll28
-rw-r--r--test/Transforms/GVN/lpre-call-wrap-2.ll10
-rw-r--r--test/Transforms/GVN/lpre-call-wrap.ll10
-rw-r--r--test/Transforms/GVN/malloc-load-removal.ll4
-rw-r--r--test/Transforms/GVN/noalias.ll18
-rw-r--r--test/Transforms/GVN/non-local-offset.ll12
-rw-r--r--test/Transforms/GVN/nonescaping-malloc.ll36
-rw-r--r--test/Transforms/GVN/null-aliases-nothing.ll6
-rw-r--r--test/Transforms/GVN/phi-translate-partial-alias.ll10
-rw-r--r--test/Transforms/GVN/phi-translate.ll8
-rw-r--r--test/Transforms/GVN/pr10820.ll2
-rw-r--r--test/Transforms/GVN/pr14166.ll6
-rw-r--r--test/Transforms/GVN/pr17732.ll8
-rw-r--r--test/Transforms/GVN/pr17852.ll44
-rw-r--r--test/Transforms/GVN/pre-basic-add.ll2
-rw-r--r--test/Transforms/GVN/pre-compare.ll6
-rw-r--r--test/Transforms/GVN/pre-gep-load.ll16
-rw-r--r--test/Transforms/GVN/pre-load.ll116
-rw-r--r--test/Transforms/GVN/pre-single-pred.ll6
-rw-r--r--test/Transforms/GVN/preserve-tbaa.ll4
-rw-r--r--test/Transforms/GVN/range.ll48
-rw-r--r--test/Transforms/GVN/readattrs.ll2
-rw-r--r--test/Transforms/GVN/rle-must-alias.ll12
-rw-r--r--test/Transforms/GVN/rle-no-phi-translate.ll2
-rw-r--r--test/Transforms/GVN/rle-nonlocal.ll10
-rw-r--r--test/Transforms/GVN/rle-phi-translate.ll32
-rw-r--r--test/Transforms/GVN/rle-semidominated.ll4
-rw-r--r--test/Transforms/GVN/rle.ll160
-rw-r--r--test/Transforms/GVN/tbaa.ll8
-rw-r--r--test/Transforms/GVN/volatile.ll80
73 files changed, 689 insertions, 661 deletions
diff --git a/test/Transforms/GVN/2007-07-25-DominatedLoop.ll b/test/Transforms/GVN/2007-07-25-DominatedLoop.ll
index ad580ce..10d1e22 100644
--- a/test/Transforms/GVN/2007-07-25-DominatedLoop.ll
+++ b/test/Transforms/GVN/2007-07-25-DominatedLoop.ll
@@ -71,11 +71,11 @@ cond_true23.i: ; preds = %Perl_safefree.exit68
ret void
cond_next150: ; preds = %Perl_safefree.exit68
- %tmp16092 = load i32* @PL_sv_count, align 4 ; <i32> [#uses=0]
+ %tmp16092 = load i32, i32* @PL_sv_count, align 4 ; <i32> [#uses=0]
br label %cond_next165
bb157: ; preds = %cond_next165
- %tmp158 = load i32* @PL_sv_count, align 4 ; <i32> [#uses=0]
+ %tmp158 = load i32, i32* @PL_sv_count, align 4 ; <i32> [#uses=0]
br label %cond_next165
cond_next165: ; preds = %bb157, %cond_next150
diff --git a/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll b/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll
index 7e9c982..0ffb34c 100644
--- a/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll
+++ b/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll
@@ -9,6 +9,6 @@ entry:
br label %bb
bb: ; preds = %bb, %entry
- %tmp10 = load %struct.INT2** @blkshifts, align 4 ; <%struct.INT2*> [#uses=0]
+ %tmp10 = load %struct.INT2*, %struct.INT2** @blkshifts, align 4 ; <%struct.INT2*> [#uses=0]
br label %bb
}
diff --git a/test/Transforms/GVN/2007-07-25-Loop.ll b/test/Transforms/GVN/2007-07-25-Loop.ll
index 6a9f58e..54c0d98 100644
--- a/test/Transforms/GVN/2007-07-25-Loop.ll
+++ b/test/Transforms/GVN/2007-07-25-Loop.ll
@@ -10,6 +10,6 @@ bb278: ; preds = %bb278, %entry
br i1 false, label %bb278, label %bb344
bb344: ; preds = %bb278, %entry
- %tmp38758 = load i16* null, align 2 ; <i16> [#uses=0]
+ %tmp38758 = load i16, i16* null, align 2 ; <i16> [#uses=0]
ret void
}
diff --git a/test/Transforms/GVN/2007-07-25-NestedLoop.ll b/test/Transforms/GVN/2007-07-25-NestedLoop.ll
index c6d7750..8f2c182 100644
--- a/test/Transforms/GVN/2007-07-25-NestedLoop.ll
+++ b/test/Transforms/GVN/2007-07-25-NestedLoop.ll
@@ -10,27 +10,27 @@ bb534.preheader: ; preds = %entry
ret %struct.TypHeader* null
bb556.preheader: ; preds = %entry
- %tmp56119 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp56220 = load i32* %tmp56119 ; <i32> [#uses=0]
+ %tmp56119 = getelementptr %struct.TypHeader, %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp56220 = load i32, i32* %tmp56119 ; <i32> [#uses=0]
br i1 false, label %bb.nph23, label %bb675.preheader
bb.nph23: ; preds = %bb556.preheader
ret %struct.TypHeader* null
bb656: ; preds = %bb675.outer, %bb656
- %tmp678 = load i32* %tmp677 ; <i32> [#uses=0]
+ %tmp678 = load i32, i32* %tmp677 ; <i32> [#uses=0]
br i1 false, label %bb684, label %bb656
bb684: ; preds = %bb675.outer, %bb656
br i1 false, label %bb924.preheader, label %bb675.outer
bb675.outer: ; preds = %bb675.preheader, %bb684
- %tmp67812 = load i32* %tmp67711 ; <i32> [#uses=0]
+ %tmp67812 = load i32, i32* %tmp67711 ; <i32> [#uses=0]
br i1 false, label %bb684, label %bb656
bb675.preheader: ; preds = %bb556.preheader
- %tmp67711 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp677 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp67711 = getelementptr %struct.TypHeader, %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp677 = getelementptr %struct.TypHeader, %struct.TypHeader* %hdR, i32 0, i32 0 ; <i32*> [#uses=1]
br label %bb675.outer
bb924.preheader: ; preds = %bb684
diff --git a/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll b/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll
index ecff657..d7e6c20 100644
--- a/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll
+++ b/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll
@@ -12,7 +12,7 @@
define i32 @_ZNK21mrZEllipticalCylinder10viewingHitERK6ggRay3dddR18mrViewingHitRecordR16ggMaterialRecord(%struct.mrXEllipticalCylinder* %this, %struct.ggBox3* %ray, double %unnamed_arg, double %tmin, double %tmax, %struct.mrViewingHitRecord* %VHR, %struct.ggMaterialRecord* %unnamed_arg2) {
entry:
- %tmp80.i = getelementptr %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; <double*> [#uses=1]
+ %tmp80.i = getelementptr %struct.mrViewingHitRecord, %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; <double*> [#uses=1]
store double 0.000000e+00, double* %tmp80.i
br i1 false, label %return, label %cond_next.i
@@ -20,8 +20,8 @@ cond_next.i: ; preds = %entry
br i1 false, label %return, label %cond_true
cond_true: ; preds = %cond_next.i
- %tmp3.i8 = getelementptr %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; <double*> [#uses=1]
- %tmp46 = load double* %tmp3.i8 ; <double> [#uses=0]
+ %tmp3.i8 = getelementptr %struct.mrViewingHitRecord, %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; <double*> [#uses=1]
+ %tmp46 = load double, double* %tmp3.i8 ; <double> [#uses=0]
ret i32 1
return: ; preds = %cond_next.i, %entry
diff --git a/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll b/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
index 5a15f0e..98e0024 100644
--- a/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
+++ b/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
@@ -5,7 +5,7 @@
define i32 @NextRootMove(i32 %wtm, i32 %x, i32 %y, i32 %z) {
entry:
%A = alloca i32*
- %tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ %tmp17618 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
store i32* %tmp17618, i32** %A
; CHECK: entry:
; CHECK-NEXT: alloca i32
@@ -19,7 +19,7 @@ cond_true116:
br i1 %cmp, label %cond_true128, label %cond_true145
cond_true128:
- %tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ %tmp17625 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
store i32* %tmp17625, i32** %A
%cmp1 = icmp eq i32 %x, %z
br i1 %cmp1 , label %bb98.backedge, label %return.loopexit
@@ -28,7 +28,7 @@ bb98.backedge:
br label %cond_true116
cond_true145:
- %tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ %tmp17631 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
store i32* %tmp17631, i32** %A
br i1 false, label %bb98.backedge, label %return.loopexit
diff --git a/test/Transforms/GVN/2007-07-26-NonRedundant.ll b/test/Transforms/GVN/2007-07-26-NonRedundant.ll
index 7579e8a..211830a 100644
--- a/test/Transforms/GVN/2007-07-26-NonRedundant.ll
+++ b/test/Transforms/GVN/2007-07-26-NonRedundant.ll
@@ -11,6 +11,6 @@ cond_next: ; preds = %entry
br label %bb19
bb19: ; preds = %cond_next, %entry
- %tmp29 = load i32* @bsLive, align 4 ; <i32> [#uses=0]
+ %tmp29 = load i32, i32* @bsLive, align 4 ; <i32> [#uses=0]
ret i32 0
}
diff --git a/test/Transforms/GVN/2007-07-26-PhiErasure.ll b/test/Transforms/GVN/2007-07-26-PhiErasure.ll
index d898ab8..82af521 100644
--- a/test/Transforms/GVN/2007-07-26-PhiErasure.ll
+++ b/test/Transforms/GVN/2007-07-26-PhiErasure.ll
@@ -9,7 +9,7 @@
define i32 @reload(%struct.rtx_def* %first, i32 %global, %struct.FILE* %dumpfile) {
cond_next2835.1: ; preds = %cond_next2861
- %tmp2922 = load i32* @n_spills, align 4 ; <i32> [#uses=0]
+ %tmp2922 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
br label %bb2928
bb2928: ; preds = %cond_next2835.1, %cond_next2943
@@ -22,7 +22,7 @@ cond_next2943: ; preds = %cond_true2935, %bb2928
br i1 false, label %bb2982.preheader, label %bb2928
bb2982.preheader: ; preds = %cond_next2943
- %tmp298316 = load i32* @n_spills, align 4 ; <i32> [#uses=0]
+ %tmp298316 = load i32, i32* @n_spills, align 4 ; <i32> [#uses=0]
ret i32 %tmp298316
}
diff --git a/test/Transforms/GVN/2007-07-30-PredIDom.ll b/test/Transforms/GVN/2007-07-30-PredIDom.ll
index 5cb6bb3..3a7eec7 100644
--- a/test/Transforms/GVN/2007-07-30-PredIDom.ll
+++ b/test/Transforms/GVN/2007-07-30-PredIDom.ll
@@ -269,6 +269,6 @@ bb970: ; preds = %entry
br label %return
return: ; preds = %0, %cond_next967, %cond_next922, %cond_next879, %cond_next807, %cond_next630, %cond_next415, %cond_next267, %cond_next191, %bb
- %retval980 = load i8** null ; <i8*> [#uses=1]
+ %retval980 = load i8*, i8** null ; <i8*> [#uses=1]
ret i8* %retval980
}
diff --git a/test/Transforms/GVN/2007-07-31-NoDomInherit.ll b/test/Transforms/GVN/2007-07-31-NoDomInherit.ll
index 5018a07..c30a283 100644
--- a/test/Transforms/GVN/2007-07-31-NoDomInherit.ll
+++ b/test/Transforms/GVN/2007-07-31-NoDomInherit.ll
@@ -149,27 +149,27 @@ entry:
br label %bb91
bb: ; preds = %cond_next97
- %tmp1 = load i32* @numi ; <i32> [#uses=1]
- %tmp2 = getelementptr [44 x i8]* @.str43, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp1 = load i32, i32* @numi ; <i32> [#uses=1]
+ %tmp2 = getelementptr [44 x i8], [44 x i8]* @.str43, i32 0, i32 0 ; <i8*> [#uses=1]
%tmp3 = call i32 (i8*, ...)* @printf( i8* %tmp2, i32 %tmp1 ) ; <i32> [#uses=0]
store i32 0, i32* %i
br label %bb13
bb4: ; preds = %bb13
- %tmp5 = load i32* %i ; <i32> [#uses=1]
- %tmp6 = load i32* %i ; <i32> [#uses=1]
- %tmp7 = getelementptr [17 x i32]* @trialx, i32 0, i32 %tmp6 ; <i32*> [#uses=1]
- %tmp8 = load i32* %tmp7 ; <i32> [#uses=1]
+ %tmp5 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp6 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp7 = getelementptr [17 x i32], [17 x i32]* @trialx, i32 0, i32 %tmp6 ; <i32*> [#uses=1]
+ %tmp8 = load i32, i32* %tmp7 ; <i32> [#uses=1]
%tmp9 = call i32 @userfun( i32 %tmp8 ) ; <i32> [#uses=1]
- %tmp10 = getelementptr [17 x i32]* @correct_result, i32 0, i32 %tmp5 ; <i32*> [#uses=1]
+ %tmp10 = getelementptr [17 x i32], [17 x i32]* @correct_result, i32 0, i32 %tmp5 ; <i32*> [#uses=1]
store i32 %tmp9, i32* %tmp10
- %tmp11 = load i32* %i ; <i32> [#uses=1]
+ %tmp11 = load i32, i32* %i ; <i32> [#uses=1]
%tmp12 = add i32 %tmp11, 1 ; <i32> [#uses=1]
store i32 %tmp12, i32* %i
br label %bb13
bb13: ; preds = %bb4, %bb
- %tmp14 = load i32* %i ; <i32> [#uses=1]
+ %tmp14 = load i32, i32* %i ; <i32> [#uses=1]
%tmp15 = icmp sle i32 %tmp14, 16 ; <i1> [#uses=1]
%tmp1516 = zext i1 %tmp15 to i32 ; <i32> [#uses=1]
%toBool = icmp ne i32 %tmp1516, 0 ; <i1> [#uses=1]
@@ -180,47 +180,47 @@ bb17: ; preds = %bb13
br label %bb49
bb18: ; preds = %bb49
- %tmp19 = load i32* %i ; <i32> [#uses=1]
- %tmp20 = getelementptr [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp19 ; <{ i32, [3 x i32] }*> [#uses=1]
- %tmp21 = getelementptr { i32, [3 x i32] }* %tmp20, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp19 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp20 = getelementptr [5 x { i32, [3 x i32] }], [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp19 ; <{ i32, [3 x i32] }*> [#uses=1]
+ %tmp21 = getelementptr { i32, [3 x i32] }, { i32, [3 x i32] }* %tmp20, i32 0, i32 0 ; <i32*> [#uses=1]
store i32 0, i32* %tmp21
- %tmp22 = load i32* %i ; <i32> [#uses=1]
- %tmp23 = getelementptr [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
- %tmp24 = getelementptr %struct.anon* %tmp23, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
- %tmp25 = getelementptr [3 x i32]* %tmp24, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp26 = load i32* %tmp25 ; <i32> [#uses=1]
- %tmp27 = getelementptr [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp22 ; <{ i32, [3 x i32] }*> [#uses=1]
- %tmp28 = getelementptr { i32, [3 x i32] }* %tmp27, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
- %tmp29 = getelementptr [3 x i32]* %tmp28, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp22 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp23 = getelementptr [13 x %struct.anon], [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
+ %tmp24 = getelementptr %struct.anon, %struct.anon* %tmp23, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
+ %tmp25 = getelementptr [3 x i32], [3 x i32]* %tmp24, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp26 = load i32, i32* %tmp25 ; <i32> [#uses=1]
+ %tmp27 = getelementptr [5 x { i32, [3 x i32] }], [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp22 ; <{ i32, [3 x i32] }*> [#uses=1]
+ %tmp28 = getelementptr { i32, [3 x i32] }, { i32, [3 x i32] }* %tmp27, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
+ %tmp29 = getelementptr [3 x i32], [3 x i32]* %tmp28, i32 0, i32 0 ; <i32*> [#uses=1]
store i32 %tmp26, i32* %tmp29
- %tmp30 = load i32* %i ; <i32> [#uses=1]
- %tmp31 = getelementptr [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
- %tmp32 = getelementptr %struct.anon* %tmp31, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
- %tmp33 = getelementptr [3 x i32]* %tmp32, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp34 = load i32* %tmp33 ; <i32> [#uses=1]
- %tmp35 = getelementptr [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp30 ; <{ i32, [3 x i32] }*> [#uses=1]
- %tmp36 = getelementptr { i32, [3 x i32] }* %tmp35, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
- %tmp37 = getelementptr [3 x i32]* %tmp36, i32 0, i32 1 ; <i32*> [#uses=1]
+ %tmp30 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp31 = getelementptr [13 x %struct.anon], [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
+ %tmp32 = getelementptr %struct.anon, %struct.anon* %tmp31, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
+ %tmp33 = getelementptr [3 x i32], [3 x i32]* %tmp32, i32 0, i32 1 ; <i32*> [#uses=1]
+ %tmp34 = load i32, i32* %tmp33 ; <i32> [#uses=1]
+ %tmp35 = getelementptr [5 x { i32, [3 x i32] }], [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp30 ; <{ i32, [3 x i32] }*> [#uses=1]
+ %tmp36 = getelementptr { i32, [3 x i32] }, { i32, [3 x i32] }* %tmp35, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
+ %tmp37 = getelementptr [3 x i32], [3 x i32]* %tmp36, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %tmp34, i32* %tmp37
- %tmp38 = load i32* %i ; <i32> [#uses=1]
- %tmp39 = getelementptr [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
- %tmp40 = getelementptr %struct.anon* %tmp39, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
- %tmp41 = getelementptr [3 x i32]* %tmp40, i32 0, i32 2 ; <i32*> [#uses=1]
- %tmp42 = load i32* %tmp41 ; <i32> [#uses=1]
- %tmp43 = getelementptr [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp38 ; <{ i32, [3 x i32] }*> [#uses=1]
- %tmp44 = getelementptr { i32, [3 x i32] }* %tmp43, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
- %tmp45 = getelementptr [3 x i32]* %tmp44, i32 0, i32 2 ; <i32*> [#uses=1]
+ %tmp38 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp39 = getelementptr [13 x %struct.anon], [13 x %struct.anon]* @isa, i32 0, i32 0 ; <%struct.anon*> [#uses=1]
+ %tmp40 = getelementptr %struct.anon, %struct.anon* %tmp39, i32 0, i32 3 ; <[3 x i32]*> [#uses=1]
+ %tmp41 = getelementptr [3 x i32], [3 x i32]* %tmp40, i32 0, i32 2 ; <i32*> [#uses=1]
+ %tmp42 = load i32, i32* %tmp41 ; <i32> [#uses=1]
+ %tmp43 = getelementptr [5 x { i32, [3 x i32] }], [5 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %tmp38 ; <{ i32, [3 x i32] }*> [#uses=1]
+ %tmp44 = getelementptr { i32, [3 x i32] }, { i32, [3 x i32] }* %tmp43, i32 0, i32 1 ; <[3 x i32]*> [#uses=1]
+ %tmp45 = getelementptr [3 x i32], [3 x i32]* %tmp44, i32 0, i32 2 ; <i32*> [#uses=1]
store i32 %tmp42, i32* %tmp45
- %tmp46 = load i32* %i ; <i32> [#uses=1]
+ %tmp46 = load i32, i32* %i ; <i32> [#uses=1]
call void @fix_operands( i32 %tmp46 )
- %tmp47 = load i32* %i ; <i32> [#uses=1]
+ %tmp47 = load i32, i32* %i ; <i32> [#uses=1]
%tmp48 = add i32 %tmp47, 1 ; <i32> [#uses=1]
store i32 %tmp48, i32* %i
br label %bb49
bb49: ; preds = %bb18, %bb17
- %tmp50 = load i32* @numi ; <i32> [#uses=1]
- %tmp51 = load i32* %i ; <i32> [#uses=1]
+ %tmp50 = load i32, i32* @numi ; <i32> [#uses=1]
+ %tmp51 = load i32, i32* %i ; <i32> [#uses=1]
%tmp52 = icmp slt i32 %tmp51, %tmp50 ; <i1> [#uses=1]
%tmp5253 = zext i1 %tmp52 to i32 ; <i32> [#uses=1]
%toBool54 = icmp ne i32 %tmp5253, 0 ; <i1> [#uses=1]
@@ -229,10 +229,10 @@ bb49: ; preds = %bb18, %bb17
bb55: ; preds = %bb49
%tmp56 = call i32 @search( ) ; <i32> [#uses=1]
store i32 %tmp56, i32* %num_sol
- %tmp57 = getelementptr [21 x i8]* @.str44, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp58 = load i32* %num_sol ; <i32> [#uses=1]
+ %tmp57 = getelementptr [21 x i8], [21 x i8]* @.str44, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp58 = load i32, i32* %num_sol ; <i32> [#uses=1]
%tmp59 = call i32 (i8*, ...)* @printf( i8* %tmp57, i32 %tmp58 ) ; <i32> [#uses=0]
- %tmp60 = load i32* @counters ; <i32> [#uses=1]
+ %tmp60 = load i32, i32* @counters ; <i32> [#uses=1]
%tmp61 = icmp ne i32 %tmp60, 0 ; <i1> [#uses=1]
%tmp6162 = zext i1 %tmp61 to i32 ; <i32> [#uses=1]
%toBool63 = icmp ne i32 %tmp6162, 0 ; <i1> [#uses=1]
@@ -240,50 +240,50 @@ bb55: ; preds = %bb49
cond_true: ; preds = %bb55
store i32 0, i32* %total
- %tmp64 = getelementptr [12 x i8]* @.str45, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp64 = getelementptr [12 x i8], [12 x i8]* @.str45, i32 0, i32 0 ; <i8*> [#uses=1]
%tmp65 = call i32 (i8*, ...)* @printf( i8* %tmp64 ) ; <i32> [#uses=0]
store i32 0, i32* %i
br label %bb79
bb66: ; preds = %bb79
- %tmp67 = load i32* %i ; <i32> [#uses=1]
- %tmp68 = getelementptr [5 x i32]* @counter, i32 0, i32 %tmp67 ; <i32*> [#uses=1]
- %tmp69 = load i32* %tmp68 ; <i32> [#uses=1]
- %tmp70 = getelementptr [5 x i8]* @.str46, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp67 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp68 = getelementptr [5 x i32], [5 x i32]* @counter, i32 0, i32 %tmp67 ; <i32*> [#uses=1]
+ %tmp69 = load i32, i32* %tmp68 ; <i32> [#uses=1]
+ %tmp70 = getelementptr [5 x i8], [5 x i8]* @.str46, i32 0, i32 0 ; <i8*> [#uses=1]
%tmp71 = call i32 (i8*, ...)* @printf( i8* %tmp70, i32 %tmp69 ) ; <i32> [#uses=0]
- %tmp72 = load i32* %i ; <i32> [#uses=1]
- %tmp73 = getelementptr [5 x i32]* @counter, i32 0, i32 %tmp72 ; <i32*> [#uses=1]
- %tmp74 = load i32* %tmp73 ; <i32> [#uses=1]
- %tmp75 = load i32* %total ; <i32> [#uses=1]
+ %tmp72 = load i32, i32* %i ; <i32> [#uses=1]
+ %tmp73 = getelementptr [5 x i32], [5 x i32]* @counter, i32 0, i32 %tmp72 ; <i32*> [#uses=1]
+ %tmp74 = load i32, i32* %tmp73 ; <i32> [#uses=1]
+ %tmp75 = load i32, i32* %total ; <i32> [#uses=1]
%tmp76 = add i32 %tmp74, %tmp75 ; <i32> [#uses=1]
store i32 %tmp76, i32* %total
- %tmp77 = load i32* %i ; <i32> [#uses=1]
+ %tmp77 = load i32, i32* %i ; <i32> [#uses=1]
%tmp78 = add i32 %tmp77, 1 ; <i32> [#uses=1]
store i32 %tmp78, i32* %i
br label %bb79
bb79: ; preds = %bb66, %cond_true
- %tmp80 = load i32* @numi ; <i32> [#uses=1]
- %tmp81 = load i32* %i ; <i32> [#uses=1]
+ %tmp80 = load i32, i32* @numi ; <i32> [#uses=1]
+ %tmp81 = load i32, i32* %i ; <i32> [#uses=1]
%tmp82 = icmp slt i32 %tmp81, %tmp80 ; <i1> [#uses=1]
%tmp8283 = zext i1 %tmp82 to i32 ; <i32> [#uses=1]
%toBool84 = icmp ne i32 %tmp8283, 0 ; <i1> [#uses=1]
br i1 %toBool84, label %bb66, label %bb85
bb85: ; preds = %bb79
- %tmp86 = getelementptr [12 x i8]* @.str47, i32 0, i32 0 ; <i8*> [#uses=1]
- %tmp87 = load i32* %total ; <i32> [#uses=1]
+ %tmp86 = getelementptr [12 x i8], [12 x i8]* @.str47, i32 0, i32 0 ; <i8*> [#uses=1]
+ %tmp87 = load i32, i32* %total ; <i32> [#uses=1]
%tmp88 = call i32 (i8*, ...)* @printf( i8* %tmp86, i32 %tmp87 ) ; <i32> [#uses=0]
br label %cond_next
cond_next: ; preds = %bb85, %bb55
- %tmp89 = load i32* @numi ; <i32> [#uses=1]
+ %tmp89 = load i32, i32* @numi ; <i32> [#uses=1]
%tmp90 = add i32 %tmp89, 1 ; <i32> [#uses=1]
store i32 %tmp90, i32* @numi
br label %bb91
bb91: ; preds = %cond_next, %entry
- %tmp92 = load i32* @numi ; <i32> [#uses=1]
+ %tmp92 = load i32, i32* @numi ; <i32> [#uses=1]
%tmp93 = icmp sgt i32 %tmp92, 5 ; <i1> [#uses=1]
%tmp9394 = zext i1 %tmp93 to i32 ; <i32> [#uses=1]
%toBool95 = icmp ne i32 %tmp9394, 0 ; <i1> [#uses=1]
@@ -293,7 +293,7 @@ cond_true96: ; preds = %bb91
br label %bb102
cond_next97: ; preds = %bb91
- %tmp98 = load i32* %num_sol ; <i32> [#uses=1]
+ %tmp98 = load i32, i32* %num_sol ; <i32> [#uses=1]
%tmp99 = icmp eq i32 %tmp98, 0 ; <i1> [#uses=1]
%tmp99100 = zext i1 %tmp99 to i32 ; <i32> [#uses=1]
%toBool101 = icmp ne i32 %tmp99100, 0 ; <i1> [#uses=1]
@@ -301,12 +301,12 @@ cond_next97: ; preds = %bb91
bb102: ; preds = %cond_next97, %cond_true96
store i32 0, i32* %tmp
- %tmp103 = load i32* %tmp ; <i32> [#uses=1]
+ %tmp103 = load i32, i32* %tmp ; <i32> [#uses=1]
store i32 %tmp103, i32* %retval
br label %return
return: ; preds = %bb102
- %retval104 = load i32* %retval ; <i32> [#uses=1]
+ %retval104 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval104
}
diff --git a/test/Transforms/GVN/2007-07-31-RedundantPhi.ll b/test/Transforms/GVN/2007-07-31-RedundantPhi.ll
index 13419d1..b285560 100644
--- a/test/Transforms/GVN/2007-07-31-RedundantPhi.ll
+++ b/test/Transforms/GVN/2007-07-31-RedundantPhi.ll
@@ -17,6 +17,6 @@ cond_false470: ; preds = %cond_next449
br label %cond_next698
cond_next698: ; preds = %cond_true492
- %tmp701 = load i16* @img_width, align 2 ; <i16> [#uses=0]
+ %tmp701 = load i16, i16* @img_width, align 2 ; <i16> [#uses=0]
ret i32 0
}
diff --git a/test/Transforms/GVN/2008-02-12-UndefLoad.ll b/test/Transforms/GVN/2008-02-12-UndefLoad.ll
index de2aa61..8ebeb14 100644
--- a/test/Transforms/GVN/2008-02-12-UndefLoad.ll
+++ b/test/Transforms/GVN/2008-02-12-UndefLoad.ll
@@ -6,9 +6,9 @@
define i32 @a() {
entry:
%c = alloca %struct.anon ; <%struct.anon*> [#uses=2]
- %tmp = getelementptr %struct.anon* %c, i32 0, i32 0 ; <i32*> [#uses=1]
- %tmp1 = getelementptr i32* %tmp, i32 1 ; <i32*> [#uses=2]
- %tmp2 = load i32* %tmp1, align 4 ; <i32> [#uses=1]
+ %tmp = getelementptr %struct.anon, %struct.anon* %c, i32 0, i32 0 ; <i32*> [#uses=1]
+ %tmp1 = getelementptr i32, i32* %tmp, i32 1 ; <i32*> [#uses=2]
+ %tmp2 = load i32, i32* %tmp1, align 4 ; <i32> [#uses=1]
%tmp3 = or i32 %tmp2, 11 ; <i32> [#uses=1]
%tmp4 = and i32 %tmp3, -21 ; <i32> [#uses=1]
store i32 %tmp4, i32* %tmp1, align 4
diff --git a/test/Transforms/GVN/2008-02-13-NewPHI.ll b/test/Transforms/GVN/2008-02-13-NewPHI.ll
index 80b519d..638939b 100644
--- a/test/Transforms/GVN/2008-02-13-NewPHI.ll
+++ b/test/Transforms/GVN/2008-02-13-NewPHI.ll
@@ -8,7 +8,7 @@ entry:
br label %bb33
bb: ; preds = %bb33
- %tmp27 = load float** %sx_addr, align 4 ; <float*> [#uses=1]
+ %tmp27 = load float*, float** %sx_addr, align 4 ; <float*> [#uses=1]
store float 0.000000e+00, float* %tmp27, align 4
store float* null, float** %sx_addr, align 4
br label %bb33
@@ -17,6 +17,6 @@ bb33: ; preds = %bb, %entry
br i1 false, label %bb, label %return
return: ; preds = %bb33
- %retval59 = load i32* null, align 4 ; <i32> [#uses=1]
+ %retval59 = load i32, i32* null, align 4 ; <i32> [#uses=1]
ret i32 %retval59
}
diff --git a/test/Transforms/GVN/2008-07-02-Unreachable.ll b/test/Transforms/GVN/2008-07-02-Unreachable.ll
index ce83fa4..d993264 100644
--- a/test/Transforms/GVN/2008-07-02-Unreachable.ll
+++ b/test/Transforms/GVN/2008-07-02-Unreachable.ll
@@ -13,7 +13,7 @@ ifthen: ; preds = %entry
br label %ifend
ifelse: ; preds = %entry
- %tmp3 = load i8* @g_3 ; <i8> [#uses=0]
+ %tmp3 = load i8, i8* @g_3 ; <i8> [#uses=0]
store i8 %tmp3, i8* %A
br label %afterfor
@@ -27,7 +27,7 @@ forinc: ; preds = %forbody
br label %forcond
afterfor: ; preds = %forcond, %forcond.thread
- %tmp10 = load i8* @g_3 ; <i8> [#uses=0]
+ %tmp10 = load i8, i8* @g_3 ; <i8> [#uses=0]
ret i8 %tmp10
ifend: ; preds = %afterfor, %ifthen
diff --git a/test/Transforms/GVN/2008-12-09-SelfRemove.ll b/test/Transforms/GVN/2008-12-09-SelfRemove.ll
index c6833e3..d8ab1ba 100644
--- a/test/Transforms/GVN/2008-12-09-SelfRemove.ll
+++ b/test/Transforms/GVN/2008-12-09-SelfRemove.ll
@@ -10,12 +10,12 @@ target triple = "i386-apple-darwin9.5"
define void @d_print_mod_list(%struct.d_print_info* %dpi, %struct.d_print_mod* %mods, i32 %suffix) nounwind {
entry:
- %0 = getelementptr %struct.d_print_info* %dpi, i32 0, i32 1 ; <i8**> [#uses=1]
+ %0 = getelementptr %struct.d_print_info, %struct.d_print_info* %dpi, i32 0, i32 1 ; <i8**> [#uses=1]
br i1 false, label %return, label %bb
bb: ; preds = %entry
- %1 = load i8** %0, align 4 ; <i8*> [#uses=0]
- %2 = getelementptr %struct.d_print_info* %dpi, i32 0, i32 1 ; <i8**> [#uses=0]
+ %1 = load i8*, i8** %0, align 4 ; <i8*> [#uses=0]
+ %2 = getelementptr %struct.d_print_info, %struct.d_print_info* %dpi, i32 0, i32 1 ; <i8**> [#uses=0]
br label %bb21
bb21: ; preds = %bb21, %bb
diff --git a/test/Transforms/GVN/2008-12-12-RLE-Crash.ll b/test/Transforms/GVN/2008-12-12-RLE-Crash.ll
index da67ee7..dabf7fa 100644
--- a/test/Transforms/GVN/2008-12-12-RLE-Crash.ll
+++ b/test/Transforms/GVN/2008-12-12-RLE-Crash.ll
@@ -7,8 +7,8 @@ entry:
br label %bb84
bb41: ; preds = %bb82
- %tmp = load i8* %opt.0, align 1 ; <i8> [#uses=0]
- %tmp1 = getelementptr i8* %opt.0, i32 1 ; <i8*> [#uses=2]
+ %tmp = load i8, i8* %opt.0, align 1 ; <i8> [#uses=0]
+ %tmp1 = getelementptr i8, i8* %opt.0, i32 1 ; <i8*> [#uses=2]
switch i32 0, label %bb81 [
i32 102, label %bb82
i32 110, label %bb79
@@ -26,10 +26,10 @@ bb81: ; preds = %bb41
bb82: ; preds = %bb84, %bb79, %bb41
%opt.0 = phi i8* [ %tmp3, %bb84 ], [ %tmp1, %bb79 ], [ %tmp1, %bb41 ] ; <i8*> [#uses=3]
- %tmp2 = load i8* %opt.0, align 1 ; <i8> [#uses=0]
+ %tmp2 = load i8, i8* %opt.0, align 1 ; <i8> [#uses=0]
br i1 false, label %bb84, label %bb41
bb84: ; preds = %bb82, %entry
- %tmp3 = getelementptr i8* null, i32 1 ; <i8*> [#uses=1]
+ %tmp3 = getelementptr i8, i8* null, i32 1 ; <i8*> [#uses=1]
br label %bb82
}
diff --git a/test/Transforms/GVN/2008-12-14-rle-reanalyze.ll b/test/Transforms/GVN/2008-12-14-rle-reanalyze.ll
index 41f76c8..207a251 100644
--- a/test/Transforms/GVN/2008-12-14-rle-reanalyze.ll
+++ b/test/Transforms/GVN/2008-12-14-rle-reanalyze.ll
@@ -11,8 +11,8 @@ bb22: ; preds = %bb23, %bb22, %entry
br i1 false, label %bb23, label %bb22
bb23: ; preds = %bb23, %bb22
- %sortv.233 = phi i32* [ getelementptr ([256 x i32]* @sort_value, i32 0, i32 0), %bb22 ], [ %sortv.2, %bb23 ] ; <i32*> [#uses=1]
- %0 = load i32* %sortv.233, align 4 ; <i32> [#uses=0]
- %sortv.2 = getelementptr [256 x i32]* @sort_value, i32 0, i32 0 ; <i32*> [#uses=1]
+ %sortv.233 = phi i32* [ getelementptr ([256 x i32], [256 x i32]* @sort_value, i32 0, i32 0), %bb22 ], [ %sortv.2, %bb23 ] ; <i32*> [#uses=1]
+ %0 = load i32, i32* %sortv.233, align 4 ; <i32> [#uses=0]
+ %sortv.2 = getelementptr [256 x i32], [256 x i32]* @sort_value, i32 0, i32 0 ; <i32*> [#uses=1]
br i1 false, label %bb23, label %bb22
}
diff --git a/test/Transforms/GVN/2008-12-15-CacheVisited.ll b/test/Transforms/GVN/2008-12-15-CacheVisited.ll
index 0a63f3f..73adacd 100644
--- a/test/Transforms/GVN/2008-12-15-CacheVisited.ll
+++ b/test/Transforms/GVN/2008-12-15-CacheVisited.ll
@@ -10,12 +10,12 @@ bb202: ; preds = %entry
unreachable
bb203: ; preds = %entry
- %tmp = getelementptr i32* %decl, i32 1 ; <i32*> [#uses=1]
- %tmp1 = load i32* %tmp, align 4 ; <i32> [#uses=0]
+ %tmp = getelementptr i32, i32* %decl, i32 1 ; <i32*> [#uses=1]
+ %tmp1 = load i32, i32* %tmp, align 4 ; <i32> [#uses=0]
br i1 false, label %bb207, label %bb204
bb204: ; preds = %bb203
- %tmp2 = getelementptr i32* %decl, i32 1 ; <i32*> [#uses=1]
+ %tmp2 = getelementptr i32, i32* %decl, i32 1 ; <i32*> [#uses=1]
br label %bb208
bb207: ; preds = %bb203
@@ -23,6 +23,6 @@ bb207: ; preds = %bb203
bb208: ; preds = %bb207, %bb204
%iftmp.1374.0.in = phi i32* [ null, %bb207 ], [ %tmp2, %bb204 ] ; <i32*> [#uses=1]
- %iftmp.1374.0 = load i32* %iftmp.1374.0.in ; <i32> [#uses=0]
+ %iftmp.1374.0 = load i32, i32* %iftmp.1374.0.in ; <i32> [#uses=0]
unreachable
}
diff --git a/test/Transforms/GVN/2009-01-21-SortInvalidation.ll b/test/Transforms/GVN/2009-01-21-SortInvalidation.ll
index 3677593..6144697 100644
--- a/test/Transforms/GVN/2009-01-21-SortInvalidation.ll
+++ b/test/Transforms/GVN/2009-01-21-SortInvalidation.ll
@@ -37,7 +37,7 @@ bb550: ; preds = %bb543
br i1 false, label %bb554, label %bb552
bb552: ; preds = %bb550
- %0 = load i8* %d.0, align 8 ; <i8> [#uses=0]
+ %0 = load i8, i8* %d.0, align 8 ; <i8> [#uses=0]
br label %bb554
bb554: ; preds = %bb552, %bb550, %bb549
diff --git a/test/Transforms/GVN/2009-01-22-SortInvalidation.ll b/test/Transforms/GVN/2009-01-22-SortInvalidation.ll
index 95690a5..89b058a 100644
--- a/test/Transforms/GVN/2009-01-22-SortInvalidation.ll
+++ b/test/Transforms/GVN/2009-01-22-SortInvalidation.ll
@@ -79,20 +79,20 @@ bb54: ; preds = %entry
br label %bb69.loopexit
bb59: ; preds = %bb63.preheader
- %0 = load %struct..4sPragmaType** %3, align 4 ; <%struct..4sPragmaType*> [#uses=0]
+ %0 = load %struct..4sPragmaType*, %struct..4sPragmaType** %3, align 4 ; <%struct..4sPragmaType*> [#uses=0]
br label %bb65
bb65: ; preds = %bb63.preheader, %bb59
- %1 = load %struct..4sPragmaType** %4, align 4 ; <%struct..4sPragmaType*> [#uses=0]
+ %1 = load %struct..4sPragmaType*, %struct..4sPragmaType** %4, align 4 ; <%struct..4sPragmaType*> [#uses=0]
br i1 false, label %bb67, label %bb63.preheader
bb67: ; preds = %bb65
- %2 = getelementptr %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=0]
+ %2 = getelementptr %struct.IdList, %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=0]
unreachable
bb69.loopexit: ; preds = %bb54, %entry
- %3 = getelementptr %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=1]
- %4 = getelementptr %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=1]
+ %3 = getelementptr %struct.IdList, %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=1]
+ %4 = getelementptr %struct.IdList, %struct.IdList* %pColumn, i32 0, i32 0 ; <%struct..4sPragmaType**> [#uses=1]
br label %bb63.preheader
bb63.preheader: ; preds = %bb69.loopexit, %bb65
diff --git a/test/Transforms/GVN/2009-02-17-LoadPRECrash.ll b/test/Transforms/GVN/2009-02-17-LoadPRECrash.ll
index c2d57a1..378d7e7 100644
--- a/test/Transforms/GVN/2009-02-17-LoadPRECrash.ll
+++ b/test/Transforms/GVN/2009-02-17-LoadPRECrash.ll
@@ -24,11 +24,11 @@ entry:
%addr = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=5]
%iftmp.1532 = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=3]
store %struct.rtx_def* %orig, %struct.rtx_def** null
- %0 = load %struct.rtx_def** null, align 4 ; <%struct.rtx_def*> [#uses=0]
+ %0 = load %struct.rtx_def*, %struct.rtx_def** null, align 4 ; <%struct.rtx_def*> [#uses=0]
br i1 false, label %bb96, label %bb59
bb59: ; preds = %entry
- %1 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
+ %1 = load %struct.rtx_def*, %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
%2 = call i32 @local_symbolic_operand(%struct.rtx_def* %1, i32 0) nounwind ; <i32> [#uses=0]
br i1 false, label %bb96, label %bb63
@@ -54,7 +54,7 @@ bb76: ; preds = %bb75, %bb74
br i1 false, label %bb77, label %bb84
bb77: ; preds = %bb76
- %3 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0]
+ %3 = getelementptr [1 x %struct.cgraph_rtl_info], [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0]
unreachable
bb84: ; preds = %bb76
@@ -89,22 +89,22 @@ bb94: ; preds = %bb93, %bb92
unreachable
bb96: ; preds = %bb59, %entry
- %5 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
- %6 = getelementptr %struct.rtx_def* %5, i32 0, i32 0 ; <i16*> [#uses=1]
- %7 = load i16* %6, align 2 ; <i16> [#uses=0]
+ %5 = load %struct.rtx_def*, %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
+ %6 = getelementptr %struct.rtx_def, %struct.rtx_def* %5, i32 0, i32 0 ; <i16*> [#uses=1]
+ %7 = load i16, i16* %6, align 2 ; <i16> [#uses=0]
br i1 false, label %bb147, label %bb97
bb97: ; preds = %bb96
- %8 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0]
+ %8 = load %struct.rtx_def*, %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0]
br i1 false, label %bb147, label %bb99
bb99: ; preds = %bb97
unreachable
bb147: ; preds = %bb97, %bb96
- %9 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
- %10 = getelementptr %struct.rtx_def* %9, i32 0, i32 0 ; <i16*> [#uses=1]
- %11 = load i16* %10, align 2 ; <i16> [#uses=0]
+ %9 = load %struct.rtx_def*, %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1]
+ %10 = getelementptr %struct.rtx_def, %struct.rtx_def* %9, i32 0, i32 0 ; <i16*> [#uses=1]
+ %11 = load i16, i16* %10, align 2 ; <i16> [#uses=0]
br i1 false, label %bb164, label %bb148
bb148: ; preds = %bb147
@@ -120,7 +120,7 @@ bb152: ; preds = %bb149
br label %bb164
bb164: ; preds = %bb152, %bb148, %bb147
- %12 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0]
+ %12 = getelementptr [1 x %struct.cgraph_rtl_info], [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0]
br i1 false, label %bb165, label %bb166
bb165: ; preds = %bb164
@@ -167,8 +167,8 @@ bb181: ; preds = %bb180, %bb170
unreachable
bb211: ; preds = %bb168, %bb167
- %14 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0]
- %15 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0]
+ %14 = load %struct.rtx_def*, %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0]
+ %15 = getelementptr [1 x %struct.cgraph_rtl_info], [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0]
store %struct.rtx_def* null, %struct.rtx_def** null, align 4
br i1 false, label %bb212, label %bb213
@@ -182,12 +182,12 @@ bb213: ; preds = %bb211
bb214: ; preds = %bb213, %bb212
%16 = bitcast %struct.block_symbol* null to [1 x %struct.cgraph_rtl_info]* ; <[1 x %struct.cgraph_rtl_info]*> [#uses=1]
- %17 = getelementptr [1 x %struct.cgraph_rtl_info]* %16, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0]
- %18 = load %struct.rtx_def** %iftmp.1532, align 4 ; <%struct.rtx_def*> [#uses=0]
- %19 = getelementptr %struct.rtx_def* null, i32 0, i32 3 ; <%struct.u*> [#uses=1]
- %20 = getelementptr %struct.u* %19, i32 0, i32 0 ; <%struct.block_symbol*> [#uses=1]
+ %17 = getelementptr [1 x %struct.cgraph_rtl_info], [1 x %struct.cgraph_rtl_info]* %16, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0]
+ %18 = load %struct.rtx_def*, %struct.rtx_def** %iftmp.1532, align 4 ; <%struct.rtx_def*> [#uses=0]
+ %19 = getelementptr %struct.rtx_def, %struct.rtx_def* null, i32 0, i32 3 ; <%struct.u*> [#uses=1]
+ %20 = getelementptr %struct.u, %struct.u* %19, i32 0, i32 0 ; <%struct.block_symbol*> [#uses=1]
%21 = bitcast %struct.block_symbol* %20 to [1 x i64]* ; <[1 x i64]*> [#uses=1]
- %22 = getelementptr [1 x i64]* %21, i32 0, i32 0 ; <i64*> [#uses=0]
+ %22 = getelementptr [1 x i64], [1 x i64]* %21, i32 0, i32 0 ; <i64*> [#uses=0]
%23 = call %struct.rtx_def* @plus_constant(%struct.rtx_def* null, i64 0) nounwind ; <%struct.rtx_def*> [#uses=0]
unreachable
}
diff --git a/test/Transforms/GVN/2009-06-17-InvalidPRE.ll b/test/Transforms/GVN/2009-06-17-InvalidPRE.ll
index 6ac6072..bf0a234 100644
--- a/test/Transforms/GVN/2009-06-17-InvalidPRE.ll
+++ b/test/Transforms/GVN/2009-06-17-InvalidPRE.ll
@@ -18,20 +18,20 @@ bb4.preheader: ; preds = %entry
bb2: ; preds = %bb1
%2 = sub i32 %len.0, %13 ; <i32> [#uses=1]
- %3 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
+ %3 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
store i32 0, i32* %3, align 4
- %4 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 0 ; <%struct.mbuf**> [#uses=1]
- %5 = load %struct.mbuf** %4, align 4 ; <%struct.mbuf*> [#uses=1]
+ %4 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 0 ; <%struct.mbuf**> [#uses=1]
+ %5 = load %struct.mbuf*, %struct.mbuf** %4, align 4 ; <%struct.mbuf*> [#uses=1]
br label %bb4.outer
bb4.outer: ; preds = %bb4.preheader, %bb2
%m.0.ph = phi %struct.mbuf* [ %5, %bb2 ], [ %mp, %bb4.preheader ] ; <%struct.mbuf*> [#uses=7]
%len.0.ph = phi i32 [ %2, %bb2 ], [ %req_len, %bb4.preheader ] ; <i32> [#uses=1]
%6 = icmp ne %struct.mbuf* %m.0.ph, null ; <i1> [#uses=1]
- %7 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
- %8 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
- %9 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 3 ; <i8**> [#uses=1]
- %10 = getelementptr %struct.mbuf* %m.0.ph, i32 0, i32 3 ; <i8**> [#uses=1]
+ %7 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
+ %8 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 2 ; <i32*> [#uses=1]
+ %9 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 3 ; <i8**> [#uses=1]
+ %10 = getelementptr %struct.mbuf, %struct.mbuf* %m.0.ph, i32 0, i32 3 ; <i8**> [#uses=1]
br label %bb4
bb4: ; preds = %bb4.outer, %bb3
@@ -41,21 +41,21 @@ bb4: ; preds = %bb4.outer, %bb3
br i1 %12, label %bb1, label %bb7
bb1: ; preds = %bb4
- %13 = load i32* %7, align 4 ; <i32> [#uses=3]
+ %13 = load i32, i32* %7, align 4 ; <i32> [#uses=3]
%14 = icmp sgt i32 %13, %len.0 ; <i1> [#uses=1]
br i1 %14, label %bb3, label %bb2
bb3: ; preds = %bb1
%15 = sub i32 %13, %len.0 ; <i32> [#uses=1]
store i32 %15, i32* %8, align 4
- %16 = load i8** %9, align 4 ; <i8*> [#uses=1]
- %17 = getelementptr i8* %16, i32 %len.0 ; <i8*> [#uses=1]
+ %16 = load i8*, i8** %9, align 4 ; <i8*> [#uses=1]
+ %17 = getelementptr i8, i8* %16, i32 %len.0 ; <i8*> [#uses=1]
store i8* %17, i8** %10, align 4
br label %bb4
bb7: ; preds = %bb4
- %18 = getelementptr %struct.mbuf* %mp, i32 0, i32 5 ; <i16*> [#uses=1]
- %19 = load i16* %18, align 2 ; <i16> [#uses=1]
+ %18 = getelementptr %struct.mbuf, %struct.mbuf* %mp, i32 0, i32 5 ; <i16*> [#uses=1]
+ %19 = load i16, i16* %18, align 2 ; <i16> [#uses=1]
%20 = zext i16 %19 to i32 ; <i32> [#uses=1]
%21 = and i32 %20, 2 ; <i32> [#uses=1]
%22 = icmp eq i32 %21, 0 ; <i1> [#uses=1]
@@ -63,7 +63,7 @@ bb7: ; preds = %bb4
bb8: ; preds = %bb7
%23 = sub i32 %req_len, %len.0 ; <i32> [#uses=1]
- %24 = getelementptr %struct.mbuf* %mp, i32 0, i32 6 ; <i32*> [#uses=1]
+ %24 = getelementptr %struct.mbuf, %struct.mbuf* %mp, i32 0, i32 6 ; <i32*> [#uses=1]
store i32 %23, i32* %24, align 4
ret void
diff --git a/test/Transforms/GVN/2009-07-13-MemDepSortFail.ll b/test/Transforms/GVN/2009-07-13-MemDepSortFail.ll
index f079108..0ed5237 100644
--- a/test/Transforms/GVN/2009-07-13-MemDepSortFail.ll
+++ b/test/Transforms/GVN/2009-07-13-MemDepSortFail.ll
@@ -22,11 +22,11 @@ bb2: ; preds = %bb
br label %bb62
bb9: ; preds = %bb
- %0 = load i8* %sp.1, align 1 ; <i8> [#uses=0]
+ %0 = load i8, i8* %sp.1, align 1 ; <i8> [#uses=0]
br label %bb62
bb51: ; preds = %bb
- %1 = load i8* %sp.1, align 1 ; <i8> [#uses=0]
+ %1 = load i8, i8* %sp.1, align 1 ; <i8> [#uses=0]
ret i8* null
bb62: ; preds = %bb9, %bb2, %bb
diff --git a/test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll b/test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll
index b433297..a12fbdd 100644
--- a/test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll
+++ b/test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll
@@ -3,12 +3,12 @@
; RUN: opt < %s -gvn -S | FileCheck %s
define i64 @test() {
- %1 = tail call i8* @malloc(i64 mul (i64 4, i64 ptrtoint (i64* getelementptr (i64* null, i64 1) to i64))) ; <i8*> [#uses=2]
+ %1 = tail call i8* @malloc(i64 mul (i64 4, i64 ptrtoint (i64* getelementptr (i64, i64* null, i64 1) to i64))) ; <i8*> [#uses=2]
store i8 42, i8* %1
%X = bitcast i8* %1 to i64* ; <i64*> [#uses=1]
- %Y = load i64* %X ; <i64> [#uses=1]
+ %Y = load i64, i64* %X ; <i64> [#uses=1]
ret i64 %Y
-; CHECK: %Y = load i64* %X
+; CHECK: %Y = load i64, i64* %X
; CHECK: ret i64 %Y
}
diff --git a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
index d6e1c6b..9d9ad54 100644
--- a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
+++ b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll
@@ -24,8 +24,8 @@ bb8: ; preds = %bb12
br i1 undef, label %bb9, label %bb10
bb9: ; preds = %bb8
- %0 = load i8** undef, align 4 ; <i8*> [#uses=0]
- %1 = load i8** undef, align 4 ; <i8*> [#uses=0]
+ %0 = load i8*, i8** undef, align 4 ; <i8*> [#uses=0]
+ %1 = load i8*, i8** undef, align 4 ; <i8*> [#uses=0]
br label %bb11
bb10: ; preds = %bb8
diff --git a/test/Transforms/GVN/2010-05-08-OneBit.ll b/test/Transforms/GVN/2010-05-08-OneBit.ll
index 480ce8b..0e3fa4b 100644
--- a/test/Transforms/GVN/2010-05-08-OneBit.ll
+++ b/test/Transforms/GVN/2010-05-08-OneBit.ll
@@ -6,7 +6,7 @@ target triple = "x86_64-unknown-linux-gnu"
define i32 @main(i32 %argc, i8** nocapture %argv) {
entry:
- %0 = getelementptr inbounds i8* undef, i64 5 ; <i8*> [#uses=1]
+ %0 = getelementptr inbounds i8, i8* undef, i64 5 ; <i8*> [#uses=1]
%1 = bitcast i8* %0 to i32* ; <i32*> [#uses=1]
store i32 undef, i32* %1, align 1
br i1 undef, label %k121.i.i, label %l117.i.i
@@ -29,9 +29,9 @@ l129.i.i: ; preds = %k121.i.i
unreachable
k133.i.i: ; preds = %k121.i.i
- %2 = getelementptr i8* undef, i64 5 ; <i8*> [#uses=1]
+ %2 = getelementptr i8, i8* undef, i64 5 ; <i8*> [#uses=1]
%3 = bitcast i8* %2 to i1* ; <i1*> [#uses=1]
- %4 = load i1* %3 ; <i1> [#uses=1]
+ %4 = load i1, i1* %3 ; <i1> [#uses=1]
br i1 %4, label %k151.i.i, label %l147.i.i
l147.i.i: ; preds = %k133.i.i
diff --git a/test/Transforms/GVN/2011-04-27-phioperands.ll b/test/Transforms/GVN/2011-04-27-phioperands.ll
index 42c4650..e964120 100644
--- a/test/Transforms/GVN/2011-04-27-phioperands.ll
+++ b/test/Transforms/GVN/2011-04-27-phioperands.ll
@@ -27,7 +27,7 @@ doemit.exit76.i:
br label %"<bb 53>.i"
"<L98>.i":
- store i8* getelementptr inbounds ([10 x i8]* @nuls, i64 0, i64 0), i8** undef, align 8
+ store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @nuls, i64 0, i64 0), i8** undef, align 8
br label %"<bb 53>.i"
"<L99>.i":
@@ -50,7 +50,7 @@ doemit.exit76.i:
"<bb 53>.i":
%wascaret_2.i = phi i32 [ 0, %"<L39>.i" ], [ 0, %"<L29>.i" ], [ 0, %"<L28>.i" ], [ 0, %"<bb 35>.i" ], [ 0, %"<L99>.i" ], [ 0, %"<L98>.i" ], [ 0, %doemit.exit76.i ], [ 1, %doemit.exit51.i ], [ 0, %"<L24>.i" ]
- %D.5496_84.i = load i8** undef, align 8
+ %D.5496_84.i = load i8*, i8** undef, align 8
br i1 undef, label %"<bb 54>.i", label %"<bb 5>"
"<bb 54>.i":
diff --git a/test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll b/test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll
index 298f274..0769575 100644
--- a/test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll
+++ b/test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll
@@ -19,10 +19,10 @@ bb1:
br i1 undef, label %bb3, label %bb15
; CHECK: bb1:
-; CHECK: [[TMP:%.*]] = phi i8* [ getelementptr (i8* null, i64 undef), %bb10 ], [ null, %bb ]
+; CHECK: [[TMP:%.*]] = phi i8* [ getelementptr (i8, i8* null, i64 undef), %bb10 ], [ null, %bb ]
; CHECK: bb1.bb15_crit_edge:
-; CHECK: %tmp17.pre = load i8* [[TMP]], align 1
+; CHECK: %tmp17.pre = load i8, i8* [[TMP]], align 1
bb3:
call void @isalnum()
@@ -32,22 +32,22 @@ bb5:
br i1 undef, label %bb10, label %bb6
bb6:
- %tmp7 = load i8** %tmp, align 8
- %tmp8 = load i8* %tmp7, align 1
+ %tmp7 = load i8*, i8** %tmp, align 8
+ %tmp8 = load i8, i8* %tmp7, align 1
%tmp9 = zext i8 %tmp8 to i64
br i1 undef, label %bb15, label %bb10
bb10:
- %tmp11 = load i8** %tmp, align 8
- %tmp12 = load i8* %tmp11, align 1
+ %tmp11 = load i8*, i8** %tmp, align 8
+ %tmp12 = load i8, i8* %tmp11, align 1
%tmp13 = zext i8 %tmp12 to i64
- %tmp14 = getelementptr inbounds i8* null, i64 undef
+ %tmp14 = getelementptr inbounds i8, i8* null, i64 undef
store i8* %tmp14, i8** %tmp, align 8
br label %bb1
bb15:
- %tmp16 = load i8** %tmp, align 8
- %tmp17 = load i8* %tmp16, align 1
+ %tmp16 = load i8*, i8** %tmp, align 8
+ %tmp17 = load i8, i8* %tmp16, align 1
%tmp18 = icmp eq i8 %tmp17, 0
br label %bb19
diff --git a/test/Transforms/GVN/MemdepMiscompile.ll b/test/Transforms/GVN/MemdepMiscompile.ll
index d420169..0652304 100644
--- a/test/Transforms/GVN/MemdepMiscompile.ll
+++ b/test/Transforms/GVN/MemdepMiscompile.ll
@@ -13,14 +13,14 @@ entry:
; CHECK: call void @RunInMode
; CHECK: br i1 %tobool, label %while.cond.backedge, label %if.then
; CHECK: while.cond.backedge:
-; CHECK: load i32* %shouldExit
+; CHECK: load i32, i32* %shouldExit
; CHECK: br i1 %cmp, label %while.body
%shouldExit = alloca i32, align 4
%tasksIdle = alloca i32, align 4
store i32 0, i32* %shouldExit, align 4
store i32 0, i32* %tasksIdle, align 4
call void @CTestInitialize(i32* %tasksIdle) nounwind
- %0 = load i32* %shouldExit, align 4
+ %0 = load i32, i32* %shouldExit, align 4
%cmp1 = icmp eq i32 %0, 0
br i1 %cmp1, label %while.body.lr.ph, label %while.end
@@ -29,7 +29,7 @@ while.body.lr.ph:
while.body:
call void @RunInMode(i32 100) nounwind
- %1 = load i32* %tasksIdle, align 4
+ %1 = load i32, i32* %tasksIdle, align 4
%tobool = icmp eq i32 %1, 0
br i1 %tobool, label %while.cond.backedge, label %if.then
@@ -39,7 +39,7 @@ if.then:
br label %while.cond.backedge
while.cond.backedge:
- %2 = load i32* %shouldExit, align 4
+ %2 = load i32, i32* %shouldExit, align 4
%cmp = icmp eq i32 %2, 0
br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge
diff --git a/test/Transforms/GVN/atomic.ll b/test/Transforms/GVN/atomic.ll
index 8c13d20..11b54f3 100644
--- a/test/Transforms/GVN/atomic.ll
+++ b/test/Transforms/GVN/atomic.ll
@@ -11,21 +11,9 @@ define i32 @test1() nounwind uwtable ssp {
; CHECK-LABEL: test1
; CHECK: add i32 %x, %x
entry:
- %x = load i32* @y
+ %x = load i32, i32* @y
store atomic i32 %x, i32* @x unordered, align 4
- %y = load i32* @y
- %z = add i32 %x, %y
- ret i32 %z
-}
-
-; GVN across seq_cst store (allowed)
-define i32 @test2() nounwind uwtable ssp {
-; CHECK-LABEL: test2
-; CHECK: add i32 %x, %x
-entry:
- %x = load i32* @y
- store atomic i32 %x, i32* @x seq_cst, align 4
- %y = load i32* @y
+ %y = load i32, i32* @y
%z = add i32 %x, %y
ret i32 %z
}
@@ -35,35 +23,21 @@ define i32 @test3() nounwind uwtable ssp {
; CHECK-LABEL: test3
; CHECK: add i32 %x, %x
entry:
- %x = load i32* @y
- %y = load atomic i32* @x unordered, align 4
- %z = load i32* @y
+ %x = load i32, i32* @y
+ %y = load atomic i32, i32* @x unordered, align 4
+ %z = load i32, i32* @y
%a = add i32 %x, %z
%b = add i32 %y, %a
ret i32 %b
}
-; GVN across acquire load (allowed as the original load was not atomic)
-define i32 @test4() nounwind uwtable ssp {
-; CHECK-LABEL: test4
-; CHECK: load atomic i32* @x
-; CHECK-NOT: load i32* @y
-entry:
- %x = load i32* @y
- %y = load atomic i32* @x seq_cst, align 4
- %x2 = load i32* @y
- %x3 = add i32 %x, %x2
- %y2 = add i32 %y, %x3
- ret i32 %y2
-}
-
; GVN load to unordered load (allowed)
define i32 @test5() nounwind uwtable ssp {
; CHECK-LABEL: test5
; CHECK: add i32 %x, %x
entry:
- %x = load atomic i32* @x unordered, align 4
- %y = load i32* @x
+ %x = load atomic i32, i32* @x unordered, align 4
+ %y = load i32, i32* @x
%z = add i32 %x, %y
ret i32 %z
}
@@ -71,10 +45,10 @@ entry:
; GVN unordered load to load (unordered load must not be removed)
define i32 @test6() nounwind uwtable ssp {
; CHECK-LABEL: test6
-; CHECK: load atomic i32* @x unordered
+; CHECK: load atomic i32, i32* @x unordered
entry:
- %x = load i32* @x
- %x2 = load atomic i32* @x unordered, align 4
+ %x = load i32, i32* @x
+ %x2 = load atomic i32, i32* @x unordered, align 4
%x3 = add i32 %x, %x2
ret i32 %x3
}
@@ -84,23 +58,10 @@ define i32 @test7() nounwind uwtable ssp {
; CHECK-LABEL: test7
; CHECK: add i32 %x, %y
entry:
- %x = load i32* @y
+ %x = load i32, i32* @y
store atomic i32 %x, i32* @x release, align 4
- %w = load atomic i32* @x acquire, align 4
- %y = load i32* @y
- %z = add i32 %x, %y
- ret i32 %z
-}
-
-; GVN across acquire-release pair (allowed)
-define i32 @test8() nounwind uwtable ssp {
-; CHECK-LABEL: test8
-; CHECK: add i32 %x, %x
-entry:
- %x = load i32* @y
- %w = load atomic i32* @x acquire, align 4
- store atomic i32 %x, i32* @x release, align 4
- %y = load i32* @y
+ %w = load atomic i32, i32* @x acquire, align 4
+ %y = load i32, i32* @y
%z = add i32 %x, %y
ret i32 %z
}
@@ -110,9 +71,9 @@ define i32 @test9() nounwind uwtable ssp {
; CHECK-LABEL: test9
; CHECK: add i32 %x, %x
entry:
- %x = load i32* @y
+ %x = load i32, i32* @y
store atomic i32 %x, i32* @x monotonic, align 4
- %y = load i32* @y
+ %y = load i32, i32* @y
%z = add i32 %x, %y
ret i32 %z
}
@@ -122,10 +83,27 @@ define i32 @test10() nounwind uwtable ssp {
; CHECK-LABEL: test10
; CHECK: add i32 %x, %y
entry:
- %x = load atomic i32* @y unordered, align 4
- %clobber = load atomic i32* @x monotonic, align 4
- %y = load atomic i32* @y monotonic, align 4
+ %x = load atomic i32, i32* @y unordered, align 4
+ %clobber = load atomic i32, i32* @x monotonic, align 4
+ %y = load atomic i32, i32* @y monotonic, align 4
%z = add i32 %x, %y
ret i32 %z
}
+define i32 @PR22708(i1 %flag) {
+; CHECK-LABEL: PR22708
+entry:
+ br i1 %flag, label %if.then, label %if.end
+
+if.then:
+ store i32 43, i32* @y, align 4
+; CHECK: store i32 43, i32* @y, align 4
+ br label %if.end
+
+if.end:
+ load atomic i32, i32* @x acquire, align 4
+ %load = load i32, i32* @y, align 4
+; CHECK: load atomic i32, i32* @x acquire, align 4
+; CHECK: load i32, i32* @y, align 4
+ ret i32 %load
+}
diff --git a/test/Transforms/GVN/calloc-load-removal.ll b/test/Transforms/GVN/calloc-load-removal.ll
index 2dde5b7..a51f71f 100644
--- a/test/Transforms/GVN/calloc-load-removal.ll
+++ b/test/Transforms/GVN/calloc-load-removal.ll
@@ -9,11 +9,11 @@ define i32 @test1() {
%1 = tail call noalias i8* @calloc(i64 1, i64 4)
%2 = bitcast i8* %1 to i32*
; This load is trivially constant zero
- %3 = load i32* %2, align 4
+ %3 = load i32, i32* %2, align 4
ret i32 %3
; CHECK-LABEL: @test1(
-; CHECK-NOT: %3 = load i32* %2, align 4
+; CHECK-NOT: %3 = load i32, i32* %2, align 4
; CHECK: ret i32 0
; CHECK_NO_LIBCALLS-LABEL: @test1(
diff --git a/test/Transforms/GVN/calls-readonly.ll b/test/Transforms/GVN/calls-readonly.ll
index a477740..ba8ad66 100644
--- a/test/Transforms/GVN/calls-readonly.ll
+++ b/test/Transforms/GVN/calls-readonly.ll
@@ -20,7 +20,7 @@ bb1: ; preds = %bb, %entry
%4 = tail call i32 @strlen(i8* %P) ; <i32> [#uses=1]
%5 = add i32 %x_addr.0, %0 ; <i32> [#uses=1]
%.sum = sub i32 %5, %4 ; <i32> [#uses=1]
- %6 = getelementptr i8* %3, i32 %.sum ; <i8*> [#uses=1]
+ %6 = getelementptr i8, i8* %3, i32 %.sum ; <i8*> [#uses=1]
ret i8* %6
}
diff --git a/test/Transforms/GVN/cond_br.ll b/test/Transforms/GVN/cond_br.ll
index 918e7d4..aeb1a6e 100644
--- a/test/Transforms/GVN/cond_br.ll
+++ b/test/Transforms/GVN/cond_br.ll
@@ -5,11 +5,11 @@
; Function Attrs: nounwind ssp uwtable
define void @foo(i32 %x) {
; CHECK: @foo(i32 %x)
-; CHECK: %.pre = load i32* @y
+; CHECK: %.pre = load i32, i32* @y
; CHECK: call void @bar(i32 %.pre)
%t = sub i32 %x, %x
- %.pre = load i32* @y, align 4
+ %.pre = load i32, i32* @y, align 4
%cmp = icmp sgt i32 %t, 2
br i1 %cmp, label %if.then, label %entry.if.end_crit_edge
@@ -29,11 +29,11 @@ if.end: ; preds = %entry.if.end_crit_e
define void @foo2(i32 %x) {
; CHECK: @foo2(i32 %x)
-; CHECK: %.pre = load i32* @y
+; CHECK: %.pre = load i32, i32* @y
; CHECK: tail call void @bar(i32 %.pre)
entry:
%t = sub i32 %x, %x
- %.pre = load i32* @y, align 4
+ %.pre = load i32, i32* @y, align 4
%cmp = icmp sgt i32 %t, 2
br i1 %cmp, label %if.then, label %if.else
diff --git a/test/Transforms/GVN/cond_br2.ll b/test/Transforms/GVN/cond_br2.ll
index a7ca219..02154a7 100644
--- a/test/Transforms/GVN/cond_br2.ll
+++ b/test/Transforms/GVN/cond_br2.ll
@@ -19,19 +19,19 @@ entry:
%sv = alloca %"class.llvm::SmallVector", align 16
%0 = bitcast %"class.llvm::SmallVector"* %sv to i8*
call void @llvm.lifetime.start(i64 64, i8* %0) #1
- %BeginX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0
- %FirstEl.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 3
+ %BeginX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0
+ %FirstEl.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 3
%1 = bitcast %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i to i8*
store i8* %1, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4
- %EndX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1
+ %EndX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1
store i8* %1, i8** %EndX.i.i.i.i.i.i, align 8, !tbaa !4
- %CapacityX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2
- %add.ptr.i.i.i.i2.i.i = getelementptr inbounds %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i, i64 2
+ %CapacityX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2
+ %add.ptr.i.i.i.i2.i.i = getelementptr inbounds %"union.llvm::SmallVectorBase::U", %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i, i64 2
%add.ptr.i.i.i.i.i.i = bitcast %"union.llvm::SmallVectorBase::U"* %add.ptr.i.i.i.i2.i.i to i8*
store i8* %add.ptr.i.i.i.i.i.i, i8** %CapacityX.i.i.i.i.i.i, align 16, !tbaa !4
- %EndX.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1
- %2 = load i8** %EndX.i, align 8, !tbaa !4
- %CapacityX.i = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2
+ %EndX.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 1
+ %2 = load i8*, i8** %EndX.i, align 8, !tbaa !4
+ %CapacityX.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 2
%cmp.i = icmp ult i8* %2, %add.ptr.i.i.i.i.i.i
br i1 %cmp.i, label %Retry.i, label %if.end.i
@@ -46,23 +46,23 @@ new.notnull.i: ; preds = %Retry.i
br label %invoke.cont
if.end.i: ; preds = %entry
- %5 = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0
+ %5 = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0
invoke void @_ZN4llvm15SmallVectorBase8grow_podEmm(%"class.llvm::SmallVectorBase"* %5, i64 0, i64 4)
to label %.noexc unwind label %lpad
.noexc: ; preds = %if.end.i
- %.pre.i = load i8** %EndX.i, align 8, !tbaa !4
+ %.pre.i = load i8*, i8** %EndX.i, align 8, !tbaa !4
br label %Retry.i
invoke.cont: ; preds = %new.notnull.i, %Retry.i
- %add.ptr.i = getelementptr inbounds i8* %3, i64 4
+ %add.ptr.i = getelementptr inbounds i8, i8* %3, i64 4
store i8* %add.ptr.i, i8** %EndX.i, align 8, !tbaa !4
- %6 = load i8** %CapacityX.i, align 16, !tbaa !4
+ %6 = load i8*, i8** %CapacityX.i, align 16, !tbaa !4
%cmp.i8 = icmp ult i8* %add.ptr.i, %6
br i1 %cmp.i8, label %new.notnull.i11, label %if.end.i14
Retry.i10: ; preds = %if.end.i14
- %.pre.i13 = load i8** %EndX.i, align 8, !tbaa !4
+ %.pre.i13 = load i8*, i8** %EndX.i, align 8, !tbaa !4
%new.isnull.i9 = icmp eq i8* %.pre.i13, null
br i1 %new.isnull.i9, label %invoke.cont2, label %new.notnull.i11
@@ -73,19 +73,19 @@ new.notnull.i11: ; preds = %invoke.cont, %Retry
br label %invoke.cont2
if.end.i14: ; preds = %invoke.cont
- %9 = getelementptr inbounds %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0
+ %9 = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0
invoke void @_ZN4llvm15SmallVectorBase8grow_podEmm(%"class.llvm::SmallVectorBase"* %9, i64 0, i64 4)
to label %Retry.i10 unwind label %lpad
invoke.cont2: ; preds = %new.notnull.i11, %Retry.i10
%10 = phi i8* [ null, %Retry.i10 ], [ %7, %new.notnull.i11 ]
- %add.ptr.i12 = getelementptr inbounds i8* %10, i64 4
+ %add.ptr.i12 = getelementptr inbounds i8, i8* %10, i64 4
store i8* %add.ptr.i12, i8** %EndX.i, align 8, !tbaa !4
invoke void @_Z1gRN4llvm11SmallVectorIiLj8EEE(%"class.llvm::SmallVector"* %sv)
to label %invoke.cont3 unwind label %lpad
invoke.cont3: ; preds = %invoke.cont2
- %11 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4
+ %11 = load i8*, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4
%cmp.i.i.i.i19 = icmp eq i8* %11, %1
br i1 %cmp.i.i.i.i19, label %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit21, label %if.then.i.i.i20
@@ -100,7 +100,7 @@ _ZN4llvm11SmallVectorIiLj8EED1Ev.exit21: ; preds = %invoke.cont3, %if.t
lpad: ; preds = %if.end.i14, %if.end.i, %invoke.cont2
%12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
cleanup
- %13 = load i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4
+ %13 = load i8*, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4
%cmp.i.i.i.i = icmp eq i8* %13, %1
br i1 %cmp.i.i.i.i, label %eh.resume, label %if.then.i.i.i
diff --git a/test/Transforms/GVN/condprop.ll b/test/Transforms/GVN/condprop.ll
index 845f88e..6aa3cb8 100644
--- a/test/Transforms/GVN/condprop.ll
+++ b/test/Transforms/GVN/condprop.ll
@@ -5,7 +5,7 @@
; CHECK-LABEL: @test1(
define i32 @test1() nounwind {
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%1 = icmp eq i32 %0, 4
br i1 %1, label %bb, label %bb1
@@ -13,7 +13,7 @@ bb: ; preds = %entry
br label %bb8
bb1: ; preds = %entry
- %2 = load i32* @a, align 4
+ %2 = load i32, i32* @a, align 4
%3 = icmp eq i32 %2, 5
br i1 %3, label %bb2, label %bb3
@@ -21,29 +21,29 @@ bb2: ; preds = %bb1
br label %bb8
bb3: ; preds = %bb1
- %4 = load i32* @a, align 4
+ %4 = load i32, i32* @a, align 4
%5 = icmp eq i32 %4, 4
; CHECK: br i1 false, label %bb4, label %bb5
br i1 %5, label %bb4, label %bb5
bb4: ; preds = %bb3
- %6 = load i32* @a, align 4
+ %6 = load i32, i32* @a, align 4
%7 = add i32 %6, 5
br label %bb8
bb5: ; preds = %bb3
- %8 = load i32* @a, align 4
+ %8 = load i32, i32* @a, align 4
%9 = icmp eq i32 %8, 5
; CHECK: br i1 false, label %bb6, label %bb7
br i1 %9, label %bb6, label %bb7
bb6: ; preds = %bb5
- %10 = load i32* @a, align 4
+ %10 = load i32, i32* @a, align 4
%11 = add i32 %10, 4
br label %bb8
bb7: ; preds = %bb5
- %12 = load i32* @a, align 4
+ %12 = load i32, i32* @a, align 4
br label %bb8
bb8: ; preds = %bb7, %bb6, %bb4, %bb2, %bb
diff --git a/test/Transforms/GVN/crash-no-aa.ll b/test/Transforms/GVN/crash-no-aa.ll
index 9ad63a7..f076a8d 100644
--- a/test/Transforms/GVN/crash-no-aa.ll
+++ b/test/Transforms/GVN/crash-no-aa.ll
@@ -5,11 +5,11 @@ target triple = "x86_64-unknown-freebsd8.0"
; PR5744
define i32 @test1({i16, i32} *%P) {
- %P2 = getelementptr {i16, i32} *%P, i32 0, i32 0
+ %P2 = getelementptr {i16, i32}, {i16, i32} *%P, i32 0, i32 0
store i16 42, i16* %P2
- %P3 = getelementptr {i16, i32} *%P, i32 0, i32 1
- %V = load i32* %P3
+ %P3 = getelementptr {i16, i32}, {i16, i32} *%P, i32 0, i32 1
+ %V = load i32, i32* %P3
ret i32 %V
}
diff --git a/test/Transforms/GVN/crash.ll b/test/Transforms/GVN/crash.ll
index 9fb612f..2abb419 100644
--- a/test/Transforms/GVN/crash.ll
+++ b/test/Transforms/GVN/crash.ll
@@ -22,7 +22,7 @@ while.body: ; preds = %while.body.backedge
lor.lhs.false: ; preds = %while.body
%tmp20 = bitcast i32* %o.addr.0 to i32* ; <i32*> [#uses=1]
- %tmp22 = load i32* %tmp20 ; <i32> [#uses=0]
+ %tmp22 = load i32, i32* %tmp20 ; <i32> [#uses=0]
br i1 undef, label %land.lhs.true24, label %if.end31
land.lhs.true24: ; preds = %lor.lhs.false
@@ -34,11 +34,11 @@ if.end31: ; preds = %land.lhs.true24, %l
if.end41: ; preds = %if.end31
%tmp43 = bitcast i32* %o.addr.0 to i32* ; <i32*> [#uses=1]
- %tmp45 = load i32* %tmp43 ; <i32> [#uses=0]
+ %tmp45 = load i32, i32* %tmp43 ; <i32> [#uses=0]
br i1 undef, label %if.then50, label %if.else
if.then50: ; preds = %if.end41
- %tmp53 = load i32** undef ; <i32*> [#uses=1]
+ %tmp53 = load i32*, i32** undef ; <i32*> [#uses=1]
br label %while.body.backedge
if.else: ; preds = %if.end41
@@ -74,16 +74,16 @@ entry:
br label %bb69.i
bb69.i: ; preds = %bb57.i.preheader
- %tmp4 = getelementptr inbounds [4 x %struct.attribute_spec*]* @attribute_tables, i32 0, i32 undef ; <%struct.attribute_spec**> [#uses=1]
- %tmp3 = load %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1]
+ %tmp4 = getelementptr inbounds [4 x %struct.attribute_spec*], [4 x %struct.attribute_spec*]* @attribute_tables, i32 0, i32 undef ; <%struct.attribute_spec**> [#uses=1]
+ %tmp3 = load %struct.attribute_spec*, %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1]
br label %bb65.i
bb65.i: ; preds = %bb65.i.preheader, %bb64.i
%storemerge6.i = phi i32 [ 1, %bb64.i ], [ 0, %bb69.i ] ; <i32> [#uses=3]
- %scevgep14 = getelementptr inbounds %struct.attribute_spec* %tmp3, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=1]
- %tmp2 = load i8** %scevgep14, align 4 ; <i8*> [#uses=0]
- %tmp = load %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1]
- %scevgep1516 = getelementptr inbounds %struct.attribute_spec* %tmp, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=0]
+ %scevgep14 = getelementptr inbounds %struct.attribute_spec, %struct.attribute_spec* %tmp3, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=1]
+ %tmp2 = load i8*, i8** %scevgep14, align 4 ; <i8*> [#uses=0]
+ %tmp = load %struct.attribute_spec*, %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1]
+ %scevgep1516 = getelementptr inbounds %struct.attribute_spec, %struct.attribute_spec* %tmp, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=0]
unreachable
bb64.i: ; Unreachable
@@ -101,7 +101,7 @@ bb66.i: ; Unreachable
define i32* @test3() {
do.end17.i:
- %tmp18.i = load i7** undef
+ %tmp18.i = load i7*, i7** undef
%tmp1 = bitcast i7* %tmp18.i to i8*
br i1 undef, label %do.body36.i, label %if.then21.i
@@ -110,12 +110,12 @@ if.then21.i:
ret i32* undef
do.body36.i:
- %ivar38.i = load i64* @g
+ %ivar38.i = load i64, i64* @g
%tmp3 = bitcast i7* %tmp18.i to i8*
%add.ptr39.sum.i = add i64 %ivar38.i, 8
- %tmp40.i = getelementptr inbounds i8* %tmp3, i64 %add.ptr39.sum.i
+ %tmp40.i = getelementptr inbounds i8, i8* %tmp3, i64 %add.ptr39.sum.i
%tmp4 = bitcast i8* %tmp40.i to i64*
- %tmp41.i = load i64* %tmp4
+ %tmp41.i = load i64, i64* %tmp4
br i1 undef, label %if.then48.i, label %do.body57.i
if.then48.i:
@@ -123,13 +123,13 @@ if.then48.i:
br label %do.body57.i
do.body57.i:
- %tmp58.i = load i7** undef
- %ivar59.i = load i64* @g
+ %tmp58.i = load i7*, i7** undef
+ %ivar59.i = load i64, i64* @g
%tmp5 = bitcast i7* %tmp58.i to i8*
%add.ptr65.sum.i = add i64 %ivar59.i, 8
- %tmp66.i = getelementptr inbounds i8* %tmp5, i64 %add.ptr65.sum.i
+ %tmp66.i = getelementptr inbounds i8, i8* %tmp5, i64 %add.ptr65.sum.i
%tmp6 = bitcast i8* %tmp66.i to i64*
- %tmp67.i = load i64* %tmp6
+ %tmp67.i = load i64, i64* %tmp6
ret i32* undef
}
@@ -142,10 +142,10 @@ entry:
ret i32 0
dead:
- %P2 = getelementptr i32 *%P2, i32 52
- %Q2 = getelementptr i32 *%Q2, i32 52
+ %P2 = getelementptr i32, i32 *%P2, i32 52
+ %Q2 = getelementptr i32, i32 *%Q2, i32 52
store i32 4, i32* %P2
- %A = load i32* %Q2
+ %A = load i32, i32* %Q2
br i1 true, label %dead, label %dead2
dead2:
@@ -156,10 +156,10 @@ dead2:
; PR9841
define fastcc i8 @test5(i8* %P) nounwind {
entry:
- %0 = load i8* %P, align 2
+ %0 = load i8, i8* %P, align 2
- %Q = getelementptr i8* %P, i32 1
- %1 = load i8* %Q, align 1
+ %Q = getelementptr i8, i8* %P, i32 1
+ %1 = load i8, i8* %Q, align 1
ret i8 %1
}
@@ -178,16 +178,16 @@ entry:
;; Unreachable code.
unreachable.bb:
- %gep.val = getelementptr inbounds %struct.type* %gep.val, i64 1
+ %gep.val = getelementptr inbounds %struct.type, %struct.type* %gep.val, i64 1
br i1 undef, label %u2.bb, label %u1.bb
u1.bb:
- %tmp1 = getelementptr inbounds %struct.type* %gep.val, i64 0, i32 0
+ %tmp1 = getelementptr inbounds %struct.type, %struct.type* %gep.val, i64 0, i32 0
store i64 -1, i64* %tmp1, align 8
br label %unreachable.bb
u2.bb:
- %0 = load i32* undef, align 4
+ %0 = load i32, i32* undef, align 4
%conv.i.i.i.i.i = zext i32 %0 to i64
br label %u2.bb
diff --git a/test/Transforms/GVN/invariant-load.ll b/test/Transforms/GVN/invariant-load.ll
index 2a83c45..f126458 100644
--- a/test/Transforms/GVN/invariant-load.ll
+++ b/test/Transforms/GVN/invariant-load.ll
@@ -3,13 +3,13 @@
define i32 @test1(i32* nocapture %p, i8* nocapture %q) {
; CHECK-LABEL: test1
-; CHECK: %x = load i32* %p, align 4, !invariant.load !0
+; CHECK: %x = load i32, i32* %p, align 4, !invariant.load !0
; CHECK-NOT: %y = load
entry:
- %x = load i32* %p, align 4, !invariant.load !0
+ %x = load i32, i32* %p, align 4, !invariant.load !0
%conv = trunc i32 %x to i8
store i8 %conv, i8* %q, align 1
- %y = load i32* %p, align 4, !invariant.load !0
+ %y = load i32, i32* %p, align 4, !invariant.load !0
%add = add i32 %y, 1
ret i32 %add
}
@@ -19,10 +19,10 @@ define i32 @test2(i32* nocapture %p, i8* nocapture %q) {
; CHECK-NOT: !invariant.load
; CHECK-NOT: %y = load
entry:
- %x = load i32* %p, align 4
+ %x = load i32, i32* %p, align 4
%conv = trunc i32 %x to i8
store i8 %conv, i8* %q, align 1
- %y = load i32* %p, align 4, !invariant.load !0
+ %y = load i32, i32* %p, align 4, !invariant.load !0
%add = add i32 %y, 1
ret i32 %add
}
@@ -33,7 +33,7 @@ define i32 @test3(i1 %cnd, i32* %p, i32* %q) {
; CHECK-LABEL: test3
; CHECK-NOT: load
entry:
- %v1 = load i32* %p
+ %v1 = load i32, i32* %p
br i1 %cnd, label %bb1, label %bb2
bb1:
@@ -41,7 +41,7 @@ bb1:
br label %bb2
bb2:
- %v2 = load i32* %p, !invariant.load !0
+ %v2 = load i32, i32* %p, !invariant.load !0
%res = sub i32 %v1, %v2
ret i32 %res
}
@@ -52,7 +52,7 @@ define i32 @test4(i1 %cnd, i32* %p, i32* %q) {
; CHECK-LABEL: test4
; %v2 is redundant, but GVN currently doesn't catch that
entry:
- %v1 = load i32* %p, !invariant.load !0
+ %v1 = load i32, i32* %p, !invariant.load !0
br i1 %cnd, label %bb1, label %bb2
bb1:
@@ -60,10 +60,60 @@ bb1:
br label %bb2
bb2:
- %v2 = load i32* %p
+ %v2 = load i32, i32* %p
%res = sub i32 %v1, %v2
ret i32 %res
}
+; Checks that we return the mustalias store as a def
+; so that it contributes to value forwarding. Note
+; that we could and should remove the store too.
+define i32 @test5(i1 %cnd, i32* %p) {
+; CHECK-LABEL: test5
+; CHECK-LABEL: entry:
+; CHECK-NEXT: store i32 5, i32* %p
+; CHECK-NEXT: ret i32 5
+entry:
+ %v1 = load i32, i32* %p, !invariant.load !0
+ store i32 5, i32* %p ;; must alias store, want to exploit
+ %v2 = load i32, i32* %p, !invariant.load !0
+ ret i32 %v2
+}
+
+
+declare void @foo()
+
+; Clobbering (mayalias) stores, even in function calls, can be ignored
+define i32 @test6(i1 %cnd, i32* %p) {
+; CHECK-LABEL: test6
+; CHECK-LABEL: entry:
+; CHECK-NEXT: @foo
+; CHECK-NEXT: ret i32 0
+entry:
+ %v1 = load i32, i32* %p, !invariant.load !0
+ call void @foo()
+ %v2 = load i32, i32* %p, !invariant.load !0
+ %res = sub i32 %v1, %v2
+ ret i32 %res
+}
+
+declare noalias i32* @bar(...)
+
+; Same as previous, but a function with a noalias result (since they're handled
+; differently in MDA)
+define i32 @test7(i1 %cnd, i32* %p) {
+; CHECK-LABEL: test7
+; CHECK-LABEL: entry:
+; CHECK-NEXT: @bar
+; CHECK-NEXT: ret i32 0
+entry:
+ %v1 = load i32, i32* %p, !invariant.load !0
+ call i32* (...)* @bar(i32* %p)
+ %v2 = load i32, i32* %p, !invariant.load !0
+ %res = sub i32 %v1, %v2
+ ret i32 %res
+}
+
+
!0 = !{ }
diff --git a/test/Transforms/GVN/lifetime-simple.ll b/test/Transforms/GVN/lifetime-simple.ll
index 02f7bcc..d03b62c 100644
--- a/test/Transforms/GVN/lifetime-simple.ll
+++ b/test/Transforms/GVN/lifetime-simple.ll
@@ -9,10 +9,10 @@ define i8 @test(i8* %P) nounwind {
; CHECK: lifetime.end
entry:
call void @llvm.lifetime.start(i64 32, i8* %P)
- %0 = load i8* %P
+ %0 = load i8, i8* %P
store i8 1, i8* %P
call void @llvm.lifetime.end(i64 32, i8* %P)
- %1 = load i8* %P
+ %1 = load i8, i8* %P
ret i8 %1
}
diff --git a/test/Transforms/GVN/load-constant-mem.ll b/test/Transforms/GVN/load-constant-mem.ll
index a7dacea..f870485 100644
--- a/test/Transforms/GVN/load-constant-mem.ll
+++ b/test/Transforms/GVN/load-constant-mem.ll
@@ -4,10 +4,10 @@
define i32 @test(i8* %p, i32 %i) nounwind {
entry:
- %P = getelementptr [4 x i32]* @G, i32 0, i32 %i
- %A = load i32* %P
+ %P = getelementptr [4 x i32], [4 x i32]* @G, i32 0, i32 %i
+ %A = load i32, i32* %P
store i8 4, i8* %p
- %B = load i32* %P
+ %B = load i32, i32* %P
%C = sub i32 %A, %B
ret i32 %C
}
diff --git a/test/Transforms/GVN/load-from-unreachable-predecessor.ll b/test/Transforms/GVN/load-from-unreachable-predecessor.ll
index b676d95..29ea14d 100644
--- a/test/Transforms/GVN/load-from-unreachable-predecessor.ll
+++ b/test/Transforms/GVN/load-from-unreachable-predecessor.ll
@@ -8,13 +8,13 @@ define i32 @f(i32** %f) {
; Load should be removed, since it's ignored.
; CHECK-NEXT: br label
bb0:
- %bar = load i32** %f
+ %bar = load i32*, i32** %f
br label %bb2
bb1:
- %zed = load i32** %f
+ %zed = load i32*, i32** %f
br i1 false, label %bb1, label %bb2
bb2:
%foo = phi i32* [ null, %bb0 ], [ %zed, %bb1 ]
- %storemerge = load i32* %foo
+ %storemerge = load i32, i32* %foo
ret i32 %storemerge
}
diff --git a/test/Transforms/GVN/load-pre-align.ll b/test/Transforms/GVN/load-pre-align.ll
index 4816af2..1198caf 100644
--- a/test/Transforms/GVN/load-pre-align.ll
+++ b/test/Transforms/GVN/load-pre-align.ll
@@ -25,7 +25,7 @@ for.cond.for.end_crit_edge:
br label %for.end
for.body:
- %tmp3 = load i32* @p, align 8
+ %tmp3 = load i32, i32* @p, align 8
%dec = add i32 %tmp3, -1
store i32 %dec, i32* @p
%cmp6 = icmp slt i32 %dec, 0
@@ -39,6 +39,6 @@ for.inc:
br label %for.cond
for.end:
- %tmp9 = load i32* @p, align 8
+ %tmp9 = load i32, i32* @p, align 8
ret i32 %tmp9
}
diff --git a/test/Transforms/GVN/load-pre-licm.ll b/test/Transforms/GVN/load-pre-licm.ll
index 63541ad..d14b01c 100644
--- a/test/Transforms/GVN/load-pre-licm.ll
+++ b/test/Transforms/GVN/load-pre-licm.ll
@@ -16,11 +16,11 @@ entry:
while.body5:
%indvar = phi i32 [ 0, %entry ], [ %tmp6, %if.end ]
%tmp5 = add i32 %indvar, 2
- %arrayidx9 = getelementptr [5001 x i32]* @sortlist, i32 0, i32 %tmp5
+ %arrayidx9 = getelementptr [5001 x i32], [5001 x i32]* @sortlist, i32 0, i32 %tmp5
%tmp6 = add i32 %indvar, 1
- %arrayidx = getelementptr [5001 x i32]* @sortlist, i32 0, i32 %tmp6
- %tmp7 = load i32* %arrayidx, align 4
- %tmp10 = load i32* %arrayidx9, align 4
+ %arrayidx = getelementptr [5001 x i32], [5001 x i32]* @sortlist, i32 0, i32 %tmp6
+ %tmp7 = load i32, i32* %arrayidx, align 4
+ %tmp10 = load i32, i32* %arrayidx9, align 4
%cmp11 = icmp sgt i32 %tmp7, %tmp10
br i1 %cmp11, label %if.then, label %if.end
diff --git a/test/Transforms/GVN/load-pre-nonlocal.ll b/test/Transforms/GVN/load-pre-nonlocal.ll
index ae508b9..c75e54d 100644
--- a/test/Transforms/GVN/load-pre-nonlocal.ll
+++ b/test/Transforms/GVN/load-pre-nonlocal.ll
@@ -12,8 +12,8 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
; CHECK-LABEL: define i32 @volatile_load
; CHECK: for.body:
-; CHECK: %2 = load i32*
-; CHECK: %3 = load volatile i32*
+; CHECK: %2 = load i32, i32*
+; CHECK: %3 = load volatile i32, i32*
; CHECK: for.cond.for.end_crit_edge:
define i32 @volatile_load(i32 %n) {
@@ -22,21 +22,21 @@ entry:
br i1 %cmp6, label %for.body.lr.ph, label %for.end
for.body.lr.ph:
- %0 = load i32** @a2, align 8, !tbaa !1
- %1 = load i32** @a, align 8, !tbaa !1
+ %0 = load i32*, i32** @a2, align 8, !tbaa !1
+ %1 = load i32*, i32** @a, align 8, !tbaa !1
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]
%s.09 = phi i32 [ 0, %for.body.lr.ph ], [ %add, %for.body ]
%p.08 = phi i32* [ %0, %for.body.lr.ph ], [ %incdec.ptr, %for.body ]
- %2 = load i32* %p.08, align 4, !tbaa !5
- %arrayidx = getelementptr inbounds i32* %1, i64 %indvars.iv
+ %2 = load i32, i32* %p.08, align 4, !tbaa !5
+ %arrayidx = getelementptr inbounds i32, i32* %1, i64 %indvars.iv
store i32 %2, i32* %arrayidx, align 4, !tbaa !5
- %3 = load volatile i32* %p.08, align 4, !tbaa !5
+ %3 = load volatile i32, i32* %p.08, align 4, !tbaa !5
%add = add nsw i32 %3, %s.09
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %incdec.ptr = getelementptr inbounds i32* %p.08, i64 1
+ %incdec.ptr = getelementptr inbounds i32, i32* %p.08, i64 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond = icmp ne i32 %lftr.wideiv, %n
br i1 %exitcond, label %for.body, label %for.cond.for.end_crit_edge
@@ -54,7 +54,7 @@ for.end:
; CHECK-LABEL: define i32 @overaligned_load
; CHECK: if.end:
-; CHECK-NOT: %1 = load i32*
+; CHECK-NOT: %1 = load i32, i32*
define i32 @overaligned_load(i32 %a, i32* nocapture %b) {
entry:
@@ -62,19 +62,19 @@ entry:
br i1 %cmp, label %if.then, label %if.else
if.then:
- %0 = load i32* getelementptr inbounds (%struct.S1* @s1, i64 0, i32 0), align 8, !tbaa !5
+ %0 = load i32, i32* getelementptr inbounds (%struct.S1, %struct.S1* @s1, i64 0, i32 0), align 8, !tbaa !5
br label %if.end
if.else:
- %arrayidx = getelementptr inbounds i32* %b, i64 2
+ %arrayidx = getelementptr inbounds i32, i32* %b, i64 2
store i32 10, i32* %arrayidx, align 4, !tbaa !5
br label %if.end
if.end:
%i.0 = phi i32 [ %0, %if.then ], [ 0, %if.else ]
- %p.0 = phi i32* [ getelementptr inbounds (%struct.S1* @s1, i64 0, i32 0), %if.then ], [ %b, %if.else ]
- %add.ptr = getelementptr inbounds i32* %p.0, i64 1
- %1 = load i32* %add.ptr, align 4, !tbaa !5
+ %p.0 = phi i32* [ getelementptr inbounds (%struct.S1, %struct.S1* @s1, i64 0, i32 0), %if.then ], [ %b, %if.else ]
+ %add.ptr = getelementptr inbounds i32, i32* %p.0, i64 1
+ %1 = load i32, i32* %add.ptr, align 4, !tbaa !5
%add1 = add nsw i32 %1, %i.0
ret i32 %add1
}
diff --git a/test/Transforms/GVN/lpre-call-wrap-2.ll b/test/Transforms/GVN/lpre-call-wrap-2.ll
index 35e3534..5dc779e 100644
--- a/test/Transforms/GVN/lpre-call-wrap-2.ll
+++ b/test/Transforms/GVN/lpre-call-wrap-2.ll
@@ -16,10 +16,10 @@ target triple = "i386-apple-darwin7"
define void @bi_windup(i8* %outbuf, i8 zeroext %bi_buf) nounwind {
entry:
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %0 = load i32* @outcnt, align 4 ; <i32> [#uses=1]
- %1 = getelementptr i8* %outbuf, i32 %0 ; <i8*> [#uses=1]
+ %0 = load i32, i32* @outcnt, align 4 ; <i32> [#uses=1]
+ %1 = getelementptr i8, i8* %outbuf, i32 %0 ; <i8*> [#uses=1]
store i8 %bi_buf, i8* %1, align 1
- %2 = load i32* @outcnt, align 4 ; <i32> [#uses=1]
+ %2 = load i32, i32* @outcnt, align 4 ; <i32> [#uses=1]
%3 = icmp eq i32 %2, 16384 ; <i1> [#uses=1]
br i1 %3, label %bb, label %bb1
@@ -31,8 +31,8 @@ bb1: ; preds = %bb, %entry
; CHECK: bb1:
; CHECK-NEXT: phi
; CHECK-NEXT: getelementptr
- %4 = load i32* @outcnt, align 4 ; <i32> [#uses=1]
- %5 = getelementptr i8* %outbuf, i32 %4 ; <i8*> [#uses=1]
+ %4 = load i32, i32* @outcnt, align 4 ; <i32> [#uses=1]
+ %5 = getelementptr i8, i8* %outbuf, i32 %4 ; <i8*> [#uses=1]
store i8 %bi_buf, i8* %5, align 1
ret void
}
diff --git a/test/Transforms/GVN/lpre-call-wrap.ll b/test/Transforms/GVN/lpre-call-wrap.ll
index 0646f3f..2748305 100644
--- a/test/Transforms/GVN/lpre-call-wrap.ll
+++ b/test/Transforms/GVN/lpre-call-wrap.ll
@@ -19,20 +19,20 @@ target triple = "i386-apple-darwin7"
define void @_Z12testfunctionR1A(%struct.A* %iter) {
entry:
- %0 = getelementptr %struct.A* %iter, i32 0, i32 0 ; <i32*> [#uses=3]
- %1 = load i32* %0, align 4 ; <i32> [#uses=2]
+ %0 = getelementptr %struct.A, %struct.A* %iter, i32 0, i32 0 ; <i32*> [#uses=3]
+ %1 = load i32, i32* %0, align 4 ; <i32> [#uses=2]
%2 = icmp eq i32 %1, 0 ; <i1> [#uses=1]
br i1 %2, label %return, label %bb.nph
bb.nph: ; preds = %entry
- %3 = getelementptr %struct.A* %iter, i32 0, i32 1 ; <i32*> [#uses=1]
+ %3 = getelementptr %struct.A, %struct.A* %iter, i32 0, i32 1 ; <i32*> [#uses=1]
br label %bb
bb: ; preds = %bb3.backedge, %bb.nph
%.rle = phi i32 [ %1, %bb.nph ], [ %7, %bb3.backedge ] ; <i32> [#uses=1]
%4 = add i32 %.rle, 1 ; <i32> [#uses=2]
store i32 %4, i32* %0, align 4
- %5 = load i32* %3, align 4 ; <i32> [#uses=1]
+ %5 = load i32, i32* %3, align 4 ; <i32> [#uses=1]
%6 = icmp eq i32 %4, %5 ; <i1> [#uses=1]
br i1 %6, label %bb1, label %bb3.backedge
@@ -44,7 +44,7 @@ bb3.backedge: ; preds = %bb, %bb1
; CHECK: bb3.backedge:
; CHECK-NEXT: phi
; CHECK-NEXT: icmp
- %7 = load i32* %0, align 4 ; <i32> [#uses=2]
+ %7 = load i32, i32* %0, align 4 ; <i32> [#uses=2]
%8 = icmp eq i32 %7, 0 ; <i1> [#uses=1]
br i1 %8, label %return, label %bb
diff --git a/test/Transforms/GVN/malloc-load-removal.ll b/test/Transforms/GVN/malloc-load-removal.ll
index d2d2fd7..1d7a2dd 100644
--- a/test/Transforms/GVN/malloc-load-removal.ll
+++ b/test/Transforms/GVN/malloc-load-removal.ll
@@ -10,7 +10,7 @@ declare i8* @malloc(i64) nounwind
define noalias i8* @test1() nounwind uwtable ssp {
entry:
%call = tail call i8* @malloc(i64 100) nounwind
- %0 = load i8* %call, align 1
+ %0 = load i8, i8* %call, align 1
%tobool = icmp eq i8 %0, 0
br i1 %tobool, label %if.end, label %if.then
@@ -35,7 +35,7 @@ declare i8* @_Znwm(i64) nounwind
define noalias i8* @test2() nounwind uwtable ssp {
entry:
%call = tail call i8* @_Znwm(i64 100) nounwind
- %0 = load i8* %call, align 1
+ %0 = load i8, i8* %call, align 1
%tobool = icmp eq i8 %0, 0
br i1 %tobool, label %if.end, label %if.then
diff --git a/test/Transforms/GVN/noalias.ll b/test/Transforms/GVN/noalias.ll
index 6c310fa..cfff096 100644
--- a/test/Transforms/GVN/noalias.ll
+++ b/test/Transforms/GVN/noalias.ll
@@ -2,21 +2,21 @@
define i32 @test1(i32* %p, i32* %q) {
; CHECK-LABEL: @test1(i32* %p, i32* %q)
-; CHECK: load i32* %p
+; CHECK: load i32, i32* %p
; CHECK-NOT: noalias
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !noalias !0
- %b = load i32* %p
+ %a = load i32, i32* %p, !noalias !0
+ %b = load i32, i32* %p
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test2(i32* %p, i32* %q) {
; CHECK-LABEL: @test2(i32* %p, i32* %q)
-; CHECK: load i32* %p, !alias.scope !0
+; CHECK: load i32, i32* %p, !alias.scope !0
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !alias.scope !0
- %b = load i32* %p, !alias.scope !0
+ %a = load i32, i32* %p, !alias.scope !0
+ %b = load i32, i32* %p, !alias.scope !0
%c = add i32 %a, %b
ret i32 %c
}
@@ -27,10 +27,10 @@ define i32 @test2(i32* %p, i32* %q) {
; throw in between.
define i32 @test3(i32* %p, i32* %q) {
; CHECK-LABEL: @test3(i32* %p, i32* %q)
-; CHECK: load i32* %p, !alias.scope !1
+; CHECK: load i32, i32* %p, !alias.scope !1
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !alias.scope !1
- %b = load i32* %p, !alias.scope !2
+ %a = load i32, i32* %p, !alias.scope !1
+ %b = load i32, i32* %p, !alias.scope !2
%c = add i32 %a, %b
ret i32 %c
}
diff --git a/test/Transforms/GVN/non-local-offset.ll b/test/Transforms/GVN/non-local-offset.ll
index 0b9edcb..2373ef5 100644
--- a/test/Transforms/GVN/non-local-offset.ll
+++ b/test/Transforms/GVN/non-local-offset.ll
@@ -13,12 +13,12 @@ target datalayout = "e-p:64:64:64"
define void @yes(i1 %c, i32* %p, i32* %q) nounwind {
entry:
store i32 0, i32* %p
- %p1 = getelementptr inbounds i32* %p, i64 1
+ %p1 = getelementptr inbounds i32, i32* %p, i64 1
store i32 1, i32* %p1
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p
+ %t = load i32, i32* %p
store i32 %t, i32* %q
ret void
@@ -35,25 +35,25 @@ if.else:
; CHECK-NEXT: store i32 0, i32* %q
; CHECK-NEXT: ret void
; CHECK: if.else:
-; CHECK: load i64* %pc
+; CHECK: load i64, i64* %pc
; CHECK: store i64
define void @watch_out_for_size_change(i1 %c, i32* %p, i32* %q) nounwind {
entry:
store i32 0, i32* %p
- %p1 = getelementptr inbounds i32* %p, i64 1
+ %p1 = getelementptr inbounds i32, i32* %p, i64 1
store i32 1, i32* %p1
br i1 %c, label %if.else, label %if.then
if.then:
- %t = load i32* %p
+ %t = load i32, i32* %p
store i32 %t, i32* %q
ret void
if.else:
%pc = bitcast i32* %p to i64*
%qc = bitcast i32* %q to i64*
- %t64 = load i64* %pc
+ %t64 = load i64, i64* %pc
store i64 %t64, i64* %qc
ret void
}
diff --git a/test/Transforms/GVN/nonescaping-malloc.ll b/test/Transforms/GVN/nonescaping-malloc.ll
index c2eeed5..f83b317 100644
--- a/test/Transforms/GVN/nonescaping-malloc.ll
+++ b/test/Transforms/GVN/nonescaping-malloc.ll
@@ -22,10 +22,10 @@ target triple = "x86_64-apple-darwin10.0"
define %"struct.llvm::StringMapEntry<void*>"* @_Z3fooRN4llvm9StringMapIPvNS_15MallocAllocatorEEEPKc(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, i8* %P) ssp {
entry:
%tmp = alloca %"struct.llvm::StringRef", align 8
- %tmp.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 0
+ %tmp.i = getelementptr inbounds %"struct.llvm::StringRef", %"struct.llvm::StringRef"* %tmp, i64 0, i32 0
store i8* %P, i8** %tmp.i, align 8
%tmp1.i = call i64 @strlen(i8* %P) nounwind readonly
- %tmp2.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 1
+ %tmp2.i = getelementptr inbounds %"struct.llvm::StringRef", %"struct.llvm::StringRef"* %tmp, i64 0, i32 1
store i64 %tmp1.i, i64* %tmp2.i, align 8
%tmp1 = call %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, %"struct.llvm::StringRef"* %tmp) ssp
ret %"struct.llvm::StringMapEntry<void*>"* %tmp1
@@ -40,16 +40,16 @@ declare i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.ll
define linkonce_odr %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, %"struct.llvm::StringRef"* nocapture %Key) ssp align 2 {
entry:
%elt = bitcast %"struct.llvm::StringRef"* %Key to i64*
- %val = load i64* %elt
- %tmp = getelementptr inbounds %"struct.llvm::StringRef"* %Key, i64 0, i32 1
- %val2 = load i64* %tmp
- %tmp2.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0
+ %val = load i64, i64* %elt
+ %tmp = getelementptr inbounds %"struct.llvm::StringRef", %"struct.llvm::StringRef"* %Key, i64 0, i32 1
+ %val2 = load i64, i64* %tmp
+ %tmp2.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>", %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0
%tmp3.i = tail call i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"* %tmp2.i, i64 %val, i64 %val2)
- %tmp4.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 0
- %tmp5.i = load %"struct.llvm::StringMapImpl::ItemBucket"** %tmp4.i, align 8
+ %tmp4.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>", %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 0
+ %tmp5.i = load %"struct.llvm::StringMapImpl::ItemBucket"*, %"struct.llvm::StringMapImpl::ItemBucket"** %tmp4.i, align 8
%tmp6.i = zext i32 %tmp3.i to i64
- %tmp7.i = getelementptr inbounds %"struct.llvm::StringMapImpl::ItemBucket"* %tmp5.i, i64 %tmp6.i, i32 1
- %tmp8.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
+ %tmp7.i = getelementptr inbounds %"struct.llvm::StringMapImpl::ItemBucket", %"struct.llvm::StringMapImpl::ItemBucket"* %tmp5.i, i64 %tmp6.i, i32 1
+ %tmp8.i = load %"struct.llvm::StringMapEntryBase"*, %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
%tmp9.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, null
%tmp13.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*)
%or.cond.i = or i1 %tmp9.i, %tmp13.i
@@ -57,7 +57,7 @@ entry:
bb4.i: ; preds = %entry
%tmp41.i = inttoptr i64 %val to i8*
- %tmp4.i35.i = getelementptr inbounds i8* %tmp41.i, i64 %val2
+ %tmp4.i35.i = getelementptr inbounds i8, i8* %tmp41.i, i64 %val2
%tmp.i.i = ptrtoint i8* %tmp4.i35.i to i64
%tmp1.i.i = trunc i64 %tmp.i.i to i32
%tmp3.i.i = trunc i64 %val to i32
@@ -72,22 +72,22 @@ bb4.i: ; preds = %entry
bb.i.i: ; preds = %bb4.i
%tmp.i.i.i.i = bitcast i8* %tmp.i20.i.i to i32*
store i32 %tmp4.i.i, i32* %tmp.i.i.i.i, align 4
- %tmp1.i19.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8
+ %tmp1.i19.i.i = getelementptr inbounds i8, i8* %tmp.i20.i.i, i64 8
%0 = bitcast i8* %tmp1.i19.i.i to i8**
store i8* null, i8** %0, align 8
br label %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i
_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i: ; preds = %bb.i.i, %bb4.i
- %tmp.i18.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 16
+ %tmp.i18.i.i = getelementptr inbounds i8, i8* %tmp.i20.i.i, i64 16
%tmp15.i.i = zext i32 %tmp4.i.i to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp.i18.i.i, i8* %tmp41.i, i64 %tmp15.i.i, i32 1, i1 false)
%tmp.i18.sum.i.i = add i64 %tmp15.i.i, 16
- %tmp17.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 %tmp.i18.sum.i.i
+ %tmp17.i.i = getelementptr inbounds i8, i8* %tmp.i20.i.i, i64 %tmp.i18.sum.i.i
store i8 0, i8* %tmp17.i.i, align 1
- %tmp.i.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8
+ %tmp.i.i.i = getelementptr inbounds i8, i8* %tmp.i20.i.i, i64 8
%1 = bitcast i8* %tmp.i.i.i to i8**
store i8* null, i8** %1, align 8
- %tmp22.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
+ %tmp22.i = load %"struct.llvm::StringMapEntryBase"*, %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8
%tmp24.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp22.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*)
br i1 %tmp24.i, label %bb9.i, label %_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueIS1_EERNS_14StringMapEntryIS1_EENS_9StringRefET_.exit
@@ -96,8 +96,8 @@ bb6.i: ; preds = %entry
ret %"struct.llvm::StringMapEntry<void*>"* %tmp16.i
bb9.i: ; preds = %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i
- %tmp25.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 3
- %tmp26.i = load i32* %tmp25.i, align 8
+ %tmp25.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>", %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 3
+ %tmp26.i = load i32, i32* %tmp25.i, align 8
%tmp27.i = add i32 %tmp26.i, -1
store i32 %tmp27.i, i32* %tmp25.i, align 8
ret %"struct.llvm::StringMapEntry<void*>"* %tmp10.i.i
diff --git a/test/Transforms/GVN/null-aliases-nothing.ll b/test/Transforms/GVN/null-aliases-nothing.ll
index 37bf09d..0b7c5eb 100644
--- a/test/Transforms/GVN/null-aliases-nothing.ll
+++ b/test/Transforms/GVN/null-aliases-nothing.ll
@@ -4,12 +4,12 @@
declare void @test1f(i8*)
define void @test1(%t* noalias %stuff ) {
- %p = getelementptr inbounds %t* %stuff, i32 0, i32 0
- %before = load i32* %p
+ %p = getelementptr inbounds %t, %t* %stuff, i32 0, i32 0
+ %before = load i32, i32* %p
call void @test1f(i8* null)
- %after = load i32* %p ; <--- This should be a dead load
+ %after = load i32, i32* %p ; <--- This should be a dead load
%sum = add i32 %before, %after
store i32 %sum, i32* %p
diff --git a/test/Transforms/GVN/phi-translate-partial-alias.ll b/test/Transforms/GVN/phi-translate-partial-alias.ll
index 47bec41..f1cf53e 100644
--- a/test/Transforms/GVN/phi-translate-partial-alias.ll
+++ b/test/Transforms/GVN/phi-translate-partial-alias.ll
@@ -8,19 +8,19 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
; CHECK: define void @test0(i8* %begin)
; CHECK: loop:
-; CHECK: %l0 = load i8* %phi
+; CHECK: %l0 = load i8, i8* %phi
; CHECK: call void @bar(i8 %l0)
-; CHECK: %l1 = load i8* %phi
+; CHECK: %l1 = load i8, i8* %phi
define void @test0(i8* %begin) {
entry:
br label %loop
loop:
%phi = phi i8* [ %begin, %entry ], [ %next, %loop ]
- %l0 = load i8* %phi
+ %l0 = load i8, i8* %phi
call void @bar(i8 %l0)
- %l1 = load i8* %phi
- %next = getelementptr inbounds i8* %phi, i8 %l1
+ %l1 = load i8, i8* %phi
+ %next = getelementptr inbounds i8, i8* %phi, i8 %l1
br label %loop
}
diff --git a/test/Transforms/GVN/phi-translate.ll b/test/Transforms/GVN/phi-translate.ll
index 50d6178..6068b05 100644
--- a/test/Transforms/GVN/phi-translate.ll
+++ b/test/Transforms/GVN/phi-translate.ll
@@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64"
; CHECK-LABEL: @foo(
; CHECK: entry.end_crit_edge:
-; CHECK: %n.pre = load i32* %q.phi.trans.insert
+; CHECK: %n.pre = load i32, i32* %q.phi.trans.insert
; CHECK: then:
; CHECK: store i32 %z
; CHECK: end:
@@ -19,13 +19,13 @@ entry:
then:
%i = sext i32 %x to i64
- %p = getelementptr [100 x i32]* @G, i64 0, i64 %i
+ %p = getelementptr [100 x i32], [100 x i32]* @G, i64 0, i64 %i
store i32 %z, i32* %p
br label %end
end:
%j = sext i32 %x to i64
- %q = getelementptr [100 x i32]* @G, i64 0, i64 %j
- %n = load i32* %q
+ %q = getelementptr [100 x i32], [100 x i32]* @G, i64 0, i64 %j
+ %n = load i32, i32* %q
ret i32 %n
}
diff --git a/test/Transforms/GVN/pr10820.ll b/test/Transforms/GVN/pr10820.ll
index 12c1e70..c6a9a93 100644
--- a/test/Transforms/GVN/pr10820.ll
+++ b/test/Transforms/GVN/pr10820.ll
@@ -11,7 +11,7 @@ entry:
; CHECK: store i32
store i32 402662078, i32* bitcast (i31* @g to i32*), align 8
; CHECK-NOT: load i31
- %0 = load i31* @g, align 8
+ %0 = load i31, i31* @g, align 8
; CHECK: store i31
store i31 %0, i31* undef, align 1
unreachable
diff --git a/test/Transforms/GVN/pr14166.ll b/test/Transforms/GVN/pr14166.ll
index 4d68205..eafe418 100644
--- a/test/Transforms/GVN/pr14166.ll
+++ b/test/Transforms/GVN/pr14166.ll
@@ -4,16 +4,16 @@ target triple = "i386-pc-linux-gnu"
define <2 x i32> @test1() {
%v1 = alloca <2 x i32>
call void @anything(<2 x i32>* %v1)
- %v2 = load <2 x i32>* %v1
+ %v2 = load <2 x i32>, <2 x i32>* %v1
%v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
%v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
store <2 x i8*> %v3, <2 x i8*>* %v4
- %v5 = load <2 x i32>* %v1
+ %v5 = load <2 x i32>, <2 x i32>* %v1
ret <2 x i32> %v5
; CHECK-LABEL: @test1(
; CHECK: %v1 = alloca <2 x i32>
; CHECK: call void @anything(<2 x i32>* %v1)
-; CHECK: %v2 = load <2 x i32>* %v1
+; CHECK: %v2 = load <2 x i32>, <2 x i32>* %v1
; CHECK: %v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
; CHECK: %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
; CHECK: store <2 x i8*> %v3, <2 x i8*>* %v4
diff --git a/test/Transforms/GVN/pr17732.ll b/test/Transforms/GVN/pr17732.ll
index 606a195..6c40ccf 100644
--- a/test/Transforms/GVN/pr17732.ll
+++ b/test/Transforms/GVN/pr17732.ll
@@ -14,11 +14,11 @@ target triple = "x86_64-unknown-linux-gnu"
define i32 @main() {
entry:
- tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds (%struct.with_array* @array_with_zeroinit, i64 0, i32 0, i64 0), i8* getelementptr inbounds ({ [2 x i8], i32, i8, [3 x i8] }* @main.obj_with_array, i64 0, i32 0, i64 0), i64 12, i32 4, i1 false)
- %0 = load i8* getelementptr inbounds (%struct.with_array* @array_with_zeroinit, i64 0, i32 2), align 4
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds (%struct.with_array, %struct.with_array* @array_with_zeroinit, i64 0, i32 0, i64 0), i8* getelementptr inbounds ({ [2 x i8], i32, i8, [3 x i8] }, { [2 x i8], i32, i8, [3 x i8] }* @main.obj_with_array, i64 0, i32 0, i64 0), i64 12, i32 4, i1 false)
+ %0 = load i8, i8* getelementptr inbounds (%struct.with_array, %struct.with_array* @array_with_zeroinit, i64 0, i32 2), align 4
- tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds (%struct.with_vector* @vector_with_zeroinit, i64 0, i32 0, i64 0), i8* getelementptr inbounds ({ <2 x i8>, i32, i8, [3 x i8] }* @main.obj_with_vector, i64 0, i32 0, i64 0), i64 12, i32 4, i1 false)
- %1 = load i8* getelementptr inbounds (%struct.with_vector* @vector_with_zeroinit, i64 0, i32 2), align 4
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds (%struct.with_vector, %struct.with_vector* @vector_with_zeroinit, i64 0, i32 0, i64 0), i8* getelementptr inbounds ({ <2 x i8>, i32, i8, [3 x i8] }, { <2 x i8>, i32, i8, [3 x i8] }* @main.obj_with_vector, i64 0, i32 0, i64 0), i64 12, i32 4, i1 false)
+ %1 = load i8, i8* getelementptr inbounds (%struct.with_vector, %struct.with_vector* @vector_with_zeroinit, i64 0, i32 2), align 4
%conv0 = sext i8 %0 to i32
%conv1 = sext i8 %1 to i32
%and = and i32 %conv0, %conv1
diff --git a/test/Transforms/GVN/pr17852.ll b/test/Transforms/GVN/pr17852.ll
index e95ff7f..9a8a709 100644
--- a/test/Transforms/GVN/pr17852.ll
+++ b/test/Transforms/GVN/pr17852.ll
@@ -5,60 +5,60 @@ define void @fn1(%struct.S0* byval align 8 %p1) {
br label %for.cond
for.cond: ; preds = %1, %0
br label %for.end
- %f2 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 2
- %f9 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 7
+ %f2 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 2
+ %f9 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 7
br label %for.cond
for.end: ; preds = %for.cond
br i1 true, label %if.else, label %if.then
if.then: ; preds = %for.end
- %f22 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 2
- %f7 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 5
- %tmp7 = load i32* %f7, align 8
+ %f22 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 2
+ %f7 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 5
+ %tmp7 = load i32, i32* %f7, align 8
br label %if.end40
if.else: ; preds = %for.end
br i1 false, label %for.cond18, label %if.then6
if.then6: ; preds = %if.else
- %f3 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 2
+ %f3 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 2
%tmp10 = bitcast %struct.S0* %p1 to i16*
- %f5 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 3
+ %f5 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 3
%tmp11 = bitcast [2 x i8]* %f5 to i16*
- %bf.load13 = load i16* %tmp11, align 8
+ %bf.load13 = load i16, i16* %tmp11, align 8
br label %if.end36
for.cond18: ; preds = %if.else
call void @fn4()
br i1 true, label %if.end, label %if.end36
if.end: ; preds = %for.cond18
- %f321 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 2
- %f925 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 7
- %f526 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 3
+ %f321 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 2
+ %f925 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 7
+ %f526 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 3
%tmp15 = bitcast [2 x i8]* %f526 to i16*
- %bf.load27 = load i16* %tmp15, align 8
+ %bf.load27 = load i16, i16* %tmp15, align 8
%tmp16 = bitcast %struct.S0* %p1 to i16*
br label %if.end36
if.end36: ; preds = %if.end, %for.cond18, %if.then6
- %f537 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 3
+ %f537 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 3
%tmp17 = bitcast [2 x i8]* %f537 to i16*
- %bf.load38 = load i16* %tmp17, align 8
+ %bf.load38 = load i16, i16* %tmp17, align 8
%bf.clear39 = and i16 %bf.load38, -16384
br label %if.end40
if.end40: ; preds = %if.end36, %if.then
- %f6 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 4
- %tmp18 = load i32* %f6, align 4
+ %f6 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 4
+ %tmp18 = load i32, i32* %f6, align 4
call void @fn2(i32 %tmp18)
- %f8 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 6
- %tmp19 = load i32* %f8, align 4
+ %f8 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 6
+ %tmp19 = load i32, i32* %f8, align 4
%tobool41 = icmp eq i32 %tmp19, 0
br i1 true, label %if.end50, label %if.then42
if.then42: ; preds = %if.end40
%tmp20 = bitcast %struct.S0* %p1 to i16*
- %f547 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 3
+ %f547 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 3
%tmp21 = bitcast [2 x i8]* %f547 to i16*
- %bf.load48 = load i16* %tmp21, align 8
+ %bf.load48 = load i16, i16* %tmp21, align 8
br label %if.end50
if.end50: ; preds = %if.then42, %if.end40
- %f551 = getelementptr inbounds %struct.S0* %p1, i64 0, i32 3
+ %f551 = getelementptr inbounds %struct.S0, %struct.S0* %p1, i64 0, i32 3
%tmp22 = bitcast [2 x i8]* %f551 to i16*
- %bf.load52 = load i16* %tmp22, align 8
+ %bf.load52 = load i16, i16* %tmp22, align 8
%bf.clear53 = and i16 %bf.load52, -16384
ret void
}
diff --git a/test/Transforms/GVN/pre-basic-add.ll b/test/Transforms/GVN/pre-basic-add.ll
index 4bde05c..460d1f9 100644
--- a/test/Transforms/GVN/pre-basic-add.ll
+++ b/test/Transforms/GVN/pre-basic-add.ll
@@ -5,7 +5,7 @@
define i32 @test() nounwind {
entry:
- %0 = load i32* @H, align 4 ; <i32> [#uses=2]
+ %0 = load i32, i32* @H, align 4 ; <i32> [#uses=2]
%1 = call i32 (...)* @foo() nounwind ; <i32> [#uses=1]
%2 = icmp ne i32 %1, 0 ; <i1> [#uses=1]
br i1 %2, label %bb, label %bb1
diff --git a/test/Transforms/GVN/pre-compare.ll b/test/Transforms/GVN/pre-compare.ll
index 18d0c2e..52c6b0b 100644
--- a/test/Transforms/GVN/pre-compare.ll
+++ b/test/Transforms/GVN/pre-compare.ll
@@ -43,7 +43,7 @@ entry:
if.then: ; preds = %entry
%cmp1 = icmp eq i32 %x, 2
- %cond = select i1 %cmp1, i8* getelementptr inbounds ([2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8]* @.str1, i64 0, i64 0)
+ %cond = select i1 %cmp1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str1, i64 0, i64 0)
%call = tail call i32 @puts(i8* %cond) nounwind
br label %for.cond.preheader
@@ -52,11 +52,11 @@ for.cond.preheader: ; preds = %entry, %if.then
br label %for.cond
for.cond: ; preds = %for.cond.backedge, %for.cond.preheader
- %call2 = tail call i32 @puts(i8* getelementptr inbounds ([7 x i8]* @.str2, i64 0, i64 0)) nounwind
+ %call2 = tail call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str2, i64 0, i64 0)) nounwind
br i1 %cmp3, label %for.cond.backedge, label %if.end5
if.end5: ; preds = %for.cond
- %call6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str3, i64 0, i64 0), i32 %x) nounwind
+ %call6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str3, i64 0, i64 0), i32 %x) nounwind
br label %for.cond.backedge
for.cond.backedge: ; preds = %if.end5, %for.cond
diff --git a/test/Transforms/GVN/pre-gep-load.ll b/test/Transforms/GVN/pre-gep-load.ll
index 3ee3a37..291af35 100644
--- a/test/Transforms/GVN/pre-gep-load.ll
+++ b/test/Transforms/GVN/pre-gep-load.ll
@@ -13,10 +13,10 @@ entry:
sw.bb: ; preds = %entry, %entry
%idxprom = sext i32 %i to i64
- %arrayidx = getelementptr inbounds double** %p, i64 0
- %0 = load double** %arrayidx, align 8
- %arrayidx1 = getelementptr inbounds double* %0, i64 %idxprom
- %1 = load double* %arrayidx1, align 8
+ %arrayidx = getelementptr inbounds double*, double** %p, i64 0
+ %0 = load double*, double** %arrayidx, align 8
+ %arrayidx1 = getelementptr inbounds double, double* %0, i64 %idxprom
+ %1 = load double, double* %arrayidx1, align 8
%sub = fsub double %1, 1.000000e+00
%cmp = fcmp olt double %sub, 0.000000e+00
br i1 %cmp, label %if.then, label %if.end
@@ -29,10 +29,10 @@ if.end: ; preds = %sw.bb
sw.bb2: ; preds = %if.end, %entry
%idxprom3 = sext i32 %i to i64
- %arrayidx4 = getelementptr inbounds double** %p, i64 0
- %2 = load double** %arrayidx4, align 8
- %arrayidx5 = getelementptr inbounds double* %2, i64 %idxprom3
- %3 = load double* %arrayidx5, align 8
+ %arrayidx4 = getelementptr inbounds double*, double** %p, i64 0
+ %2 = load double*, double** %arrayidx4, align 8
+ %arrayidx5 = getelementptr inbounds double, double* %2, i64 %idxprom3
+ %3 = load double, double* %arrayidx5, align 8
; CHECK: sw.bb2:
; CHECK-NEXT-NOT: sext
; CHECK-NEXT: phi double [
diff --git a/test/Transforms/GVN/pre-load.ll b/test/Transforms/GVN/pre-load.ll
index 9842886..24221d5 100644
--- a/test/Transforms/GVN/pre-load.ll
+++ b/test/Transforms/GVN/pre-load.ll
@@ -9,14 +9,14 @@ block1:
block2:
br label %block4
; CHECK: block2:
-; CHECK-NEXT: load i32* %p
+; CHECK-NEXT: load i32, i32* %p
block3:
store i32 0, i32* %p
br label %block4
block4:
- %PRE = load i32* %p
+ %PRE = load i32, i32* %p
ret i32 %PRE
; CHECK: block4:
; CHECK-NEXT: phi i32
@@ -32,7 +32,7 @@ block1:
block2:
br label %block4
; CHECK: block2:
-; CHECK-NEXT: load i32* %q
+; CHECK-NEXT: load i32, i32* %q
block3:
store i32 0, i32* %p
@@ -40,7 +40,7 @@ block3:
block4:
%P2 = phi i32* [%p, %block3], [%q, %block2]
- %PRE = load i32* %P2
+ %PRE = load i32, i32* %P2
ret i32 %PRE
; CHECK: block4:
; CHECK-NEXT: phi i32 [
@@ -52,24 +52,24 @@ block4:
define i32 @test3(i32* %p, i32* %q, i32** %Hack, i1 %C) {
; CHECK-LABEL: @test3(
block1:
- %B = getelementptr i32* %q, i32 1
+ %B = getelementptr i32, i32* %q, i32 1
store i32* %B, i32** %Hack
br i1 %C, label %block2, label %block3
block2:
br label %block4
; CHECK: block2:
-; CHECK-NEXT: load i32* %B
+; CHECK-NEXT: load i32, i32* %B
block3:
- %A = getelementptr i32* %p, i32 1
+ %A = getelementptr i32, i32* %p, i32 1
store i32 0, i32* %A
br label %block4
block4:
%P2 = phi i32* [%p, %block3], [%q, %block2]
- %P3 = getelementptr i32* %P2, i32 1
- %PRE = load i32* %P3
+ %P3 = getelementptr i32, i32* %P2, i32 1
+ %PRE = load i32, i32* %P3
ret i32 %PRE
; CHECK: block4:
; CHECK-NEXT: phi i32 [
@@ -87,21 +87,21 @@ block1:
block2:
br label %block4
; CHECK: block2:
-; CHECK: load i32*
+; CHECK: load i32, i32*
; CHECK: br label %block4
block3:
- %B = getelementptr i32* %q, i32 1
+ %B = getelementptr i32, i32* %q, i32 1
store i32* %B, i32** %Hack
- %A = getelementptr i32* %p, i32 1
+ %A = getelementptr i32, i32* %p, i32 1
store i32 0, i32* %A
br label %block4
block4:
%P2 = phi i32* [%p, %block3], [%q, %block2]
- %P3 = getelementptr i32* %P2, i32 1
- %PRE = load i32* %P3
+ %P3 = getelementptr i32, i32* %P2, i32 1
+ %PRE = load i32, i32* %P3
ret i32 %PRE
; CHECK: block4:
; CHECK-NEXT: phi i32 [
@@ -127,16 +127,16 @@ bb.nph:
br label %bb
; CHECK: bb.nph:
-; CHECK: load double*
+; CHECK: load double, double*
; CHECK: br label %bb
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp6, %bb ]
%tmp6 = add i64 %indvar, 1
- %scevgep = getelementptr double* %G, i64 %tmp6
- %scevgep7 = getelementptr double* %G, i64 %indvar
- %2 = load double* %scevgep7, align 8
- %3 = load double* %scevgep, align 8
+ %scevgep = getelementptr double, double* %G, i64 %tmp6
+ %scevgep7 = getelementptr double, double* %G, i64 %indvar
+ %2 = load double, double* %scevgep7, align 8
+ %3 = load double, double* %scevgep, align 8
%4 = fadd double %2, %3
store double %4, double* %scevgep7, align 8
%exitcond = icmp eq i64 %tmp6, %tmp
@@ -144,8 +144,8 @@ bb:
; Should only be one load in the loop.
; CHECK: bb:
-; CHECK: load double*
-; CHECK-NOT: load double*
+; CHECK: load double, double*
+; CHECK-NOT: load double, double*
; CHECK: br i1 %exitcond
return:
@@ -170,16 +170,16 @@ bb.nph:
br label %bb
; CHECK: bb.nph:
-; CHECK: load double*
+; CHECK: load double, double*
; CHECK: br label %bb
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp6, %bb ]
%tmp6 = add i64 %indvar, 1
- %scevgep = getelementptr double* %G, i64 %tmp6
- %scevgep7 = getelementptr double* %G, i64 %indvar
- %2 = load double* %scevgep7, align 8
- %3 = load double* %scevgep, align 8
+ %scevgep = getelementptr double, double* %G, i64 %tmp6
+ %scevgep7 = getelementptr double, double* %G, i64 %indvar
+ %2 = load double, double* %scevgep7, align 8
+ %3 = load double, double* %scevgep, align 8
%4 = fadd double %2, %3
store double %4, double* %scevgep, align 8
%exitcond = icmp eq i64 %tmp6, %tmp
@@ -187,8 +187,8 @@ bb:
; Should only be one load in the loop.
; CHECK: bb:
-; CHECK: load double*
-; CHECK-NOT: load double*
+; CHECK: load double, double*
+; CHECK-NOT: load double, double*
; CHECK: br i1 %exitcond
return:
@@ -205,7 +205,7 @@ return:
; This requires phi translation of the adds.
define void @test7(i32 %N, double* nocapture %G) nounwind ssp {
entry:
- %0 = getelementptr inbounds double* %G, i64 1
+ %0 = getelementptr inbounds double, double* %G, i64 1
store double 1.000000e+00, double* %0, align 8
%1 = add i32 %N, -1
%2 = icmp sgt i32 %1, 1
@@ -219,11 +219,11 @@ bb.nph:
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp9, %bb ]
%tmp8 = add i64 %indvar, 2
- %scevgep = getelementptr double* %G, i64 %tmp8
+ %scevgep = getelementptr double, double* %G, i64 %tmp8
%tmp9 = add i64 %indvar, 1
- %scevgep10 = getelementptr double* %G, i64 %tmp9
- %3 = load double* %scevgep10, align 8
- %4 = load double* %scevgep, align 8
+ %scevgep10 = getelementptr double, double* %G, i64 %tmp9
+ %3 = load double, double* %scevgep10, align 8
+ %4 = load double, double* %scevgep, align 8
%5 = fadd double %3, %4
store double %5, double* %scevgep, align 8
%exitcond = icmp eq i64 %tmp9, %tmp7
@@ -231,8 +231,8 @@ bb:
; Should only be one load in the loop.
; CHECK: bb:
-; CHECK: load double*
-; CHECK-NOT: load double*
+; CHECK: load double, double*
+; CHECK-NOT: load double, double*
; CHECK: br i1 %exitcond
return:
@@ -249,18 +249,18 @@ block1:
block2:
br label %block4
; CHECK: block2:
-; CHECK: load i32*
+; CHECK: load i32, i32*
; CHECK: br label %block4
block3:
- %A = getelementptr i32* %p, i32 1
+ %A = getelementptr i32, i32* %p, i32 1
store i32 0, i32* %A
br label %block4
block4:
%P2 = phi i32* [%p, %block3], [%q, %block2]
- %P3 = getelementptr i32* %P2, i32 1
- %PRE = load i32* %P3
+ %P3 = getelementptr i32, i32* %P2, i32 1
+ %PRE = load i32, i32* %P3
ret i32 %PRE
; CHECK: block4:
; CHECK-NEXT: phi i32 [
@@ -288,17 +288,17 @@ bb.nph:
br label %bb
; CHECK: bb.nph:
-; CHECK: load double*
+; CHECK: load double, double*
; CHECK: br label %bb
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp9, %bb ]
%tmp8 = add i64 %indvar, 2
- %scevgep = getelementptr double* %G, i64 %tmp8
+ %scevgep = getelementptr double, double* %G, i64 %tmp8
%tmp9 = add i64 %indvar, 1
- %scevgep10 = getelementptr double* %G, i64 %tmp9
- %3 = load double* %scevgep10, align 8
- %4 = load double* %scevgep, align 8
+ %scevgep10 = getelementptr double, double* %G, i64 %tmp9
+ %3 = load double, double* %scevgep10, align 8
+ %4 = load double, double* %scevgep, align 8
%5 = fadd double %3, %4
store double %5, double* %scevgep, align 8
%exitcond = icmp eq i64 %tmp9, %tmp7
@@ -306,8 +306,8 @@ bb:
; Should only be one load in the loop.
; CHECK: bb:
-; CHECK: load double*
-; CHECK-NOT: load double*
+; CHECK: load double, double*
+; CHECK-NOT: load double, double*
; CHECK: br i1 %exitcond
return:
@@ -332,22 +332,22 @@ bb.nph:
%tmp8 = add i64 %tmp, -1
br label %bb
; CHECK: bb.nph:
-; CHECK: load double*
-; CHECK: load double*
+; CHECK: load double, double*
+; CHECK: load double, double*
; CHECK: br label %bb
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp11, %bb ]
- %scevgep = getelementptr double* %G, i64 %indvar
+ %scevgep = getelementptr double, double* %G, i64 %indvar
%tmp9 = add i64 %indvar, 2
- %scevgep10 = getelementptr double* %G, i64 %tmp9
+ %scevgep10 = getelementptr double, double* %G, i64 %tmp9
%tmp11 = add i64 %indvar, 1
- %scevgep12 = getelementptr double* %G, i64 %tmp11
- %2 = load double* %scevgep12, align 8
- %3 = load double* %scevgep10, align 8
+ %scevgep12 = getelementptr double, double* %G, i64 %tmp11
+ %2 = load double, double* %scevgep12, align 8
+ %3 = load double, double* %scevgep10, align 8
%4 = fadd double %2, %3
- %5 = load double* %scevgep, align 8
+ %5 = load double, double* %scevgep, align 8
%6 = fadd double %4, %5
store double %6, double* %scevgep12, align 8
%exitcond = icmp eq i64 %tmp11, %tmp8
@@ -355,8 +355,8 @@ bb:
; Should only be one load in the loop.
; CHECK: bb:
-; CHECK: load double*
-; CHECK-NOT: load double*
+; CHECK: load double, double*
+; CHECK-NOT: load double, double*
; CHECK: br i1 %exitcond
return:
@@ -372,7 +372,7 @@ block1:
block2:
%cond = icmp sgt i32 %N, 1
br i1 %cond, label %block4, label %block5
-; CHECK: load i32* %p
+; CHECK: load i32, i32* %p
; CHECK-NEXT: br label %block4
block3:
@@ -380,7 +380,7 @@ block3:
br label %block4
block4:
- %PRE = load i32* %p
+ %PRE = load i32, i32* %p
br label %block5
block5:
diff --git a/test/Transforms/GVN/pre-single-pred.ll b/test/Transforms/GVN/pre-single-pred.ll
index f1f5c71..0df45cf 100644
--- a/test/Transforms/GVN/pre-single-pred.ll
+++ b/test/Transforms/GVN/pre-single-pred.ll
@@ -23,9 +23,9 @@ for.cond.for.end_crit_edge: ; preds = %for.cond
br label %for.end
; CHECK: for.body:
-; CHECK-NEXT: %tmp3 = load i32* @p
+; CHECK-NEXT: %tmp3 = load i32, i32* @p
for.body: ; preds = %for.cond
- %tmp3 = load i32* @p ; <i32> [#uses=1]
+ %tmp3 = load i32, i32* @p ; <i32> [#uses=1]
%dec = add i32 %tmp3, -1 ; <i32> [#uses=2]
store i32 %dec, i32* @p
%cmp6 = icmp slt i32 %dec, 0 ; <i1> [#uses=1]
@@ -40,6 +40,6 @@ for.inc: ; preds = %for.body
br label %for.cond
for.end: ; preds = %for.body.for.end_crit_edge, %for.cond.for.end_crit_edge
- %tmp9 = load i32* @p ; <i32> [#uses=1]
+ %tmp9 = load i32, i32* @p ; <i32> [#uses=1]
ret i32 %tmp9
}
diff --git a/test/Transforms/GVN/preserve-tbaa.ll b/test/Transforms/GVN/preserve-tbaa.ll
index 587d463..19467ee 100644
--- a/test/Transforms/GVN/preserve-tbaa.ll
+++ b/test/Transforms/GVN/preserve-tbaa.ll
@@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64"
; GVN should preserve the TBAA tag on loads when doing PRE.
; CHECK-LABEL: @test(
-; CHECK: %tmp33.pre = load i16* %P, align 2, !tbaa !0
+; CHECK: %tmp33.pre = load i16, i16* %P, align 2, !tbaa !0
; CHECK: br label %for.body
define void @test(i16 *%P, i16* %Q) nounwind {
entry:
@@ -15,7 +15,7 @@ bb.nph: ; preds = %entry
br label %for.body
for.body: ; preds = %for.body, %bb.nph
- %tmp33 = load i16* %P, align 2, !tbaa !0
+ %tmp33 = load i16, i16* %P, align 2, !tbaa !0
store i16 %tmp33, i16* %Q
store i16 0, i16* %P, align 2, !tbaa !0
diff --git a/test/Transforms/GVN/range.ll b/test/Transforms/GVN/range.ll
index 3720232..297c6aa 100644
--- a/test/Transforms/GVN/range.ll
+++ b/test/Transforms/GVN/range.ll
@@ -2,82 +2,82 @@
define i32 @test1(i32* %p) {
; CHECK: @test1(i32* %p)
-; CHECK: %a = load i32* %p, !range !0
+; CHECK: %a = load i32, i32* %p, !range !0
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !0
- %b = load i32* %p, !range !0
+ %a = load i32, i32* %p, !range !0
+ %b = load i32, i32* %p, !range !0
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test2(i32* %p) {
; CHECK: @test2(i32* %p)
-; CHECK: %a = load i32* %p
+; CHECK: %a = load i32, i32* %p
; CHECK-NOT: range
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !0
- %b = load i32* %p
+ %a = load i32, i32* %p, !range !0
+ %b = load i32, i32* %p
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test3(i32* %p) {
; CHECK: @test3(i32* %p)
-; CHECK: %a = load i32* %p, !range ![[DISJOINT_RANGE:[0-9]+]]
+; CHECK: %a = load i32, i32* %p, !range ![[DISJOINT_RANGE:[0-9]+]]
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !0
- %b = load i32* %p, !range !1
+ %a = load i32, i32* %p, !range !0
+ %b = load i32, i32* %p, !range !1
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test4(i32* %p) {
; CHECK: @test4(i32* %p)
-; CHECK: %a = load i32* %p, !range ![[MERGED_RANGE:[0-9]+]]
+; CHECK: %a = load i32, i32* %p, !range ![[MERGED_RANGE:[0-9]+]]
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !0
- %b = load i32* %p, !range !2
+ %a = load i32, i32* %p, !range !0
+ %b = load i32, i32* %p, !range !2
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test5(i32* %p) {
; CHECK: @test5(i32* %p)
-; CHECK: %a = load i32* %p, !range ![[MERGED_SIGNED_RANGE:[0-9]+]]
+; CHECK: %a = load i32, i32* %p, !range ![[MERGED_SIGNED_RANGE:[0-9]+]]
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !3
- %b = load i32* %p, !range !4
+ %a = load i32, i32* %p, !range !3
+ %b = load i32, i32* %p, !range !4
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test6(i32* %p) {
; CHECK: @test6(i32* %p)
-; CHECK: %a = load i32* %p, !range ![[MERGED_TEST6:[0-9]+]]
+; CHECK: %a = load i32, i32* %p, !range ![[MERGED_TEST6:[0-9]+]]
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !5
- %b = load i32* %p, !range !6
+ %a = load i32, i32* %p, !range !5
+ %b = load i32, i32* %p, !range !6
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test7(i32* %p) {
; CHECK: @test7(i32* %p)
-; CHECK: %a = load i32* %p, !range ![[MERGED_TEST7:[0-9]+]]
+; CHECK: %a = load i32, i32* %p, !range ![[MERGED_TEST7:[0-9]+]]
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !7
- %b = load i32* %p, !range !8
+ %a = load i32, i32* %p, !range !7
+ %b = load i32, i32* %p, !range !8
%c = add i32 %a, %b
ret i32 %c
}
define i32 @test8(i32* %p) {
; CHECK: @test8(i32* %p)
-; CHECK: %a = load i32* %p
+; CHECK: %a = load i32, i32* %p
; CHECK-NOT: range
; CHECK: %c = add i32 %a, %a
- %a = load i32* %p, !range !9
- %b = load i32* %p, !range !10
+ %a = load i32, i32* %p, !range !9
+ %b = load i32, i32* %p, !range !10
%c = add i32 %a, %b
ret i32 %c
}
diff --git a/test/Transforms/GVN/readattrs.ll b/test/Transforms/GVN/readattrs.ll
index ba624a7..fb36d07 100644
--- a/test/Transforms/GVN/readattrs.ll
+++ b/test/Transforms/GVN/readattrs.ll
@@ -9,7 +9,7 @@ define i8 @test() {
%a = alloca i8
store i8 1, i8* %a
call void @use(i8* %a)
- %b = load i8* %a
+ %b = load i8, i8* %a
ret i8 %b
; CHECK-LABEL: define i8 @test(
; CHECK: call void @use(i8* %a)
diff --git a/test/Transforms/GVN/rle-must-alias.ll b/test/Transforms/GVN/rle-must-alias.ll
index e7dc9c4..0d181dd 100644
--- a/test/Transforms/GVN/rle-must-alias.ll
+++ b/test/Transforms/GVN/rle-must-alias.ll
@@ -17,22 +17,22 @@ entry:
bb: ; preds = %entry
%2 = tail call i32 (...)* @bar() nounwind ; <i32> [#uses=0]
- %3 = getelementptr [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
- %4 = load i32* %3, align 4 ; <i32> [#uses=1]
+ %3 = getelementptr [100 x i32], [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
+ %4 = load i32, i32* %3, align 4 ; <i32> [#uses=1]
store i32 %4, i32* @G, align 4
br label %bb3
bb1: ; preds = %entry
%5 = tail call i32 (...)* @baz() nounwind ; <i32> [#uses=0]
- %6 = getelementptr [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
- %7 = load i32* %6, align 4 ; <i32> [#uses=2]
+ %6 = getelementptr [100 x i32], [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
+ %7 = load i32, i32* %6, align 4 ; <i32> [#uses=2]
store i32 %7, i32* @G, align 4
%8 = icmp eq i32 %7, 0 ; <i1> [#uses=1]
br i1 %8, label %bb3, label %bb4
bb3: ; preds = %bb1, %bb
- %9 = getelementptr [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
- %DEAD = load i32* %9, align 4 ; <i32> [#uses=1]
+ %9 = getelementptr [100 x i32], [100 x i32]* @H, i32 0, i32 %i ; <i32*> [#uses=1]
+ %DEAD = load i32, i32* %9, align 4 ; <i32> [#uses=1]
ret i32 %DEAD
bb4: ; preds = %bb1
diff --git a/test/Transforms/GVN/rle-no-phi-translate.ll b/test/Transforms/GVN/rle-no-phi-translate.ll
index 96dbf48..c1fd201 100644
--- a/test/Transforms/GVN/rle-no-phi-translate.ll
+++ b/test/Transforms/GVN/rle-no-phi-translate.ll
@@ -19,7 +19,7 @@ bb: ; preds = %entry
bb2: ; preds = %bb1, %bb
%c_addr.0 = phi i32* [ %b, %entry ], [ %c, %bb ] ; <i32*> [#uses=1]
- %cv = load i32* %c_addr.0, align 4 ; <i32> [#uses=1]
+ %cv = load i32, i32* %c_addr.0, align 4 ; <i32> [#uses=1]
ret i32 %cv
; CHECK: bb2:
; CHECK-NOT: load i32
diff --git a/test/Transforms/GVN/rle-nonlocal.ll b/test/Transforms/GVN/rle-nonlocal.ll
index 8229aaa..7975462 100644
--- a/test/Transforms/GVN/rle-nonlocal.ll
+++ b/test/Transforms/GVN/rle-nonlocal.ll
@@ -6,20 +6,20 @@ block1:
br i1 %cmp , label %block2, label %block3
block2:
- %a = load i32** %p
+ %a = load i32*, i32** %p
br label %block4
block3:
- %b = load i32** %p
+ %b = load i32*, i32** %p
br label %block4
block4:
; CHECK-NOT: %existingPHI = phi
; CHECK: %DEAD = phi
%existingPHI = phi i32* [ %a, %block2 ], [ %b, %block3 ]
- %DEAD = load i32** %p
- %c = load i32* %DEAD
- %d = load i32* %existingPHI
+ %DEAD = load i32*, i32** %p
+ %c = load i32, i32* %DEAD
+ %d = load i32, i32* %existingPHI
%e = add i32 %c, %d
ret i32 %e
}
diff --git a/test/Transforms/GVN/rle-phi-translate.ll b/test/Transforms/GVN/rle-phi-translate.ll
index 1ce7e0b..7402e1a 100644
--- a/test/Transforms/GVN/rle-phi-translate.ll
+++ b/test/Transforms/GVN/rle-phi-translate.ll
@@ -11,13 +11,13 @@ entry:
br i1 %t1, label %bb, label %bb1
bb:
- %t2 = load i32* %c, align 4
+ %t2 = load i32, i32* %c, align 4
%t3 = add i32 %t2, 1
store i32 %t3, i32* %g, align 4
br label %bb2
bb1: ; preds = %entry
- %t5 = load i32* %b, align 4
+ %t5 = load i32, i32* %b, align 4
%t6 = add i32 %t5, 1
store i32 %t6, i32* %g, align 4
br label %bb2
@@ -25,8 +25,8 @@ bb1: ; preds = %entry
bb2: ; preds = %bb1, %bb
%c_addr.0 = phi i32* [ %g, %bb1 ], [ %c, %bb ]
%b_addr.0 = phi i32* [ %b, %bb1 ], [ %g, %bb ]
- %cv = load i32* %c_addr.0, align 4
- %bv = load i32* %b_addr.0, align 4
+ %cv = load i32, i32* %c_addr.0, align 4
+ %bv = load i32, i32* %b_addr.0, align 4
; CHECK: %bv = phi i32
; CHECK: %cv = phi i32
; CHECK-NOT: load
@@ -53,7 +53,7 @@ bb1:
bb2:
%d = phi i32* [ %c, %bb1 ], [ %b, %bb ]
%d1 = bitcast i32* %d to i8*
- %dv = load i8* %d1
+ %dv = load i8, i8* %d1
; CHECK: %dv = phi i8 [ 92, %bb1 ], [ 4, %bb ]
; CHECK-NOT: load
; CHECK: ret i8 %dv
@@ -66,20 +66,20 @@ entry:
br i1 %cond, label %bb, label %bb1
bb:
- %b1 = getelementptr i32* %b, i32 17
+ %b1 = getelementptr i32, i32* %b, i32 17
store i32 4, i32* %b1
br label %bb2
bb1:
- %c1 = getelementptr i32* %c, i32 7
+ %c1 = getelementptr i32, i32* %c, i32 7
store i32 82, i32* %c1
br label %bb2
bb2:
%d = phi i32* [ %c, %bb1 ], [ %b, %bb ]
%i = phi i32 [ 7, %bb1 ], [ 17, %bb ]
- %d1 = getelementptr i32* %d, i32 %i
- %dv = load i32* %d1
+ %d1 = getelementptr i32, i32* %d, i32 %i
+ %dv = load i32, i32* %d1
; CHECK: %dv = phi i32 [ 82, %bb1 ], [ 4, %bb ]
; CHECK-NOT: load
; CHECK: ret i32 %dv
@@ -97,15 +97,15 @@ bb:
br label %bb2
bb1:
- %c1 = getelementptr i32* %c, i32 7
+ %c1 = getelementptr i32, i32* %c, i32 7
store i32 82, i32* %c1
br label %bb2
bb2:
%d = phi i32* [ %c, %bb1 ], [ %b, %bb ]
%i = phi i32 [ 7, %bb1 ], [ 0, %bb ]
- %d1 = getelementptr i32* %d, i32 %i
- %dv = load i32* %d1
+ %d1 = getelementptr i32, i32* %d, i32 %i
+ %dv = load i32, i32* %d1
; CHECK: %dv = phi i32 [ 82, %bb1 ], [ 4, %bb ]
; CHECK-NOT: load
; CHECK: ret i32 %dv
@@ -127,11 +127,11 @@ bb.nph:
for.body:
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp, %for.body ]
- %arrayidx6 = getelementptr double* %G, i64 %indvar
+ %arrayidx6 = getelementptr double, double* %G, i64 %indvar
%tmp = add i64 %indvar, 1
- %arrayidx = getelementptr double* %G, i64 %tmp
- %tmp3 = load double* %arrayidx
- %tmp7 = load double* %arrayidx6
+ %arrayidx = getelementptr double, double* %G, i64 %tmp
+ %tmp3 = load double, double* %arrayidx
+ %tmp7 = load double, double* %arrayidx6
%add = fadd double %tmp3, %tmp7
store double %add, double* %arrayidx
%exitcond = icmp eq i64 %tmp, 999
diff --git a/test/Transforms/GVN/rle-semidominated.ll b/test/Transforms/GVN/rle-semidominated.ll
index 923cd03..f80d040 100644
--- a/test/Transforms/GVN/rle-semidominated.ll
+++ b/test/Transforms/GVN/rle-semidominated.ll
@@ -2,7 +2,7 @@
define i32 @main(i32* %p, i32 %x, i32 %y) {
block1:
- %z = load i32* %p
+ %z = load i32, i32* %p
%cmp = icmp eq i32 %x, %y
br i1 %cmp, label %block2, label %block3
@@ -15,6 +15,6 @@ block3:
br label %block4
block4:
- %DEAD = load i32* %p
+ %DEAD = load i32, i32* %p
ret i32 %DEAD
}
diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll
index 6aac93e..3f42135 100644
--- a/test/Transforms/GVN/rle.ll
+++ b/test/Transforms/GVN/rle.ll
@@ -5,7 +5,7 @@
define i32 @test0(i32 %V, i32* %P) {
store i32 %V, i32* %P
- %A = load i32* %P
+ %A = load i32, i32* %P
ret i32 %A
; CHECK-LABEL: @test0(
; CHECK: ret i32 %V
@@ -20,7 +20,7 @@ define i32 @test0(i32 %V, i32* %P) {
define i8 @crash0({i32, i32} %A, {i32, i32}* %P) {
store {i32, i32} %A, {i32, i32}* %P
%X = bitcast {i32, i32}* %P to i8*
- %Y = load i8* %X
+ %Y = load i8, i8* %X
ret i8 %Y
}
@@ -28,7 +28,7 @@ define i8 @crash0({i32, i32} %A, {i32, i32}* %P) {
declare void @helper()
define void @crash1() {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* undef, i8* undef, i64 undef, i32 1, i1 false) nounwind
- %tmp = load i8* bitcast (void ()* @helper to i8*)
+ %tmp = load i8, i8* bitcast (void ()* @helper to i8*)
%x = icmp eq i8 %tmp, 15
ret void
}
@@ -45,7 +45,7 @@ define float @coerce_mustalias1(i32 %V, i32* %P) {
%P2 = bitcast i32* %P to float*
- %A = load float* %P2
+ %A = load float, float* %P2
ret float %A
; CHECK-LABEL: @coerce_mustalias1(
; CHECK-NOT: load
@@ -58,7 +58,7 @@ define float @coerce_mustalias2(i32* %V, i32** %P) {
%P2 = bitcast i32** %P to float*
- %A = load float* %P2
+ %A = load float, float* %P2
ret float %A
; CHECK-LABEL: @coerce_mustalias2(
; CHECK-NOT: load
@@ -71,7 +71,7 @@ define i32* @coerce_mustalias3(float %V, float* %P) {
%P2 = bitcast float* %P to i32**
- %A = load i32** %P2
+ %A = load i32*, i32** %P2
ret i32* %A
; CHECK-LABEL: @coerce_mustalias3(
; CHECK-NOT: load
@@ -80,10 +80,10 @@ define i32* @coerce_mustalias3(float %V, float* %P) {
;; i32 -> f32 load forwarding.
define float @coerce_mustalias4(i32* %P, i1 %cond) {
- %A = load i32* %P
+ %A = load i32, i32* %P
%P2 = bitcast i32* %P to float*
- %B = load float* %P2
+ %B = load float, float* %P2
br i1 %cond, label %T, label %F
T:
ret float %B
@@ -93,7 +93,7 @@ F:
ret float %X
; CHECK-LABEL: @coerce_mustalias4(
-; CHECK: %A = load i32* %P
+; CHECK: %A = load i32, i32* %P
; CHECK-NOT: load
; CHECK: ret float
; CHECK: F:
@@ -105,7 +105,7 @@ define i8 @coerce_mustalias5(i32 %V, i32* %P) {
%P2 = bitcast i32* %P to i8*
- %A = load i8* %P2
+ %A = load i8, i8* %P2
ret i8 %A
; CHECK-LABEL: @coerce_mustalias5(
; CHECK-NOT: load
@@ -118,7 +118,7 @@ define float @coerce_mustalias6(i64 %V, i64* %P) {
%P2 = bitcast i64* %P to float*
- %A = load float* %P2
+ %A = load float, float* %P2
ret float %A
; CHECK-LABEL: @coerce_mustalias6(
; CHECK-NOT: load
@@ -131,7 +131,7 @@ define i8* @coerce_mustalias7(i64 %V, i64* %P) {
%P2 = bitcast i64* %P to i8**
- %A = load i8** %P2
+ %A = load i8*, i8** %P2
ret i8* %A
; CHECK-LABEL: @coerce_mustalias7(
; CHECK-NOT: load
@@ -143,8 +143,8 @@ define signext i16 @memset_to_i16_local(i16* %A) nounwind ssp {
entry:
%conv = bitcast i16* %A to i8*
tail call void @llvm.memset.p0i8.i64(i8* %conv, i8 1, i64 200, i32 1, i1 false)
- %arrayidx = getelementptr inbounds i16* %A, i64 42
- %tmp2 = load i16* %arrayidx
+ %arrayidx = getelementptr inbounds i16, i16* %A, i64 42
+ %tmp2 = load i16, i16* %arrayidx
ret i16 %tmp2
; CHECK-LABEL: @memset_to_i16_local(
; CHECK-NOT: load
@@ -156,8 +156,8 @@ define float @memset_to_float_local(float* %A, i8 %Val) nounwind ssp {
entry:
%conv = bitcast float* %A to i8* ; <i8*> [#uses=1]
tail call void @llvm.memset.p0i8.i64(i8* %conv, i8 %Val, i64 400, i32 1, i1 false)
- %arrayidx = getelementptr inbounds float* %A, i64 42 ; <float*> [#uses=1]
- %tmp2 = load float* %arrayidx ; <float> [#uses=1]
+ %arrayidx = getelementptr inbounds float, float* %A, i64 42 ; <float*> [#uses=1]
+ %tmp2 = load float, float* %arrayidx ; <float> [#uses=1]
ret float %tmp2
; CHECK-LABEL: @memset_to_float_local(
; CHECK-NOT: load
@@ -183,8 +183,8 @@ F:
br label %Cont
Cont:
- %P2 = getelementptr i16* %P, i32 4
- %A = load i16* %P2
+ %P2 = getelementptr i16, i16* %P, i32 4
+ %A = load i16, i16* %P2
ret i16 %A
; CHECK-LABEL: @memset_to_i16_nonlocal0(
@@ -202,8 +202,8 @@ define float @memcpy_to_float_local(float* %A) nounwind ssp {
entry:
%conv = bitcast float* %A to i8* ; <i8*> [#uses=1]
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %conv, i8* bitcast ({i32, float, i32 }* @GCst to i8*), i64 12, i32 1, i1 false)
- %arrayidx = getelementptr inbounds float* %A, i64 1 ; <float*> [#uses=1]
- %tmp2 = load float* %arrayidx ; <float> [#uses=1]
+ %arrayidx = getelementptr inbounds float, float* %A, i64 1 ; <float*> [#uses=1]
+ %tmp2 = load float, float* %arrayidx ; <float> [#uses=1]
ret float %tmp2
; CHECK-LABEL: @memcpy_to_float_local(
; CHECK-NOT: load
@@ -215,8 +215,8 @@ define float @memcpy_to_float_local_as1(float* %A) nounwind ssp {
entry:
%conv = bitcast float* %A to i8* ; <i8*> [#uses=1]
tail call void @llvm.memcpy.p0i8.p1i8.i64(i8* %conv, i8 addrspace(1)* bitcast ({i32, float, i32 } addrspace(1)* @GCst_as1 to i8 addrspace(1)*), i64 12, i32 1, i1 false)
- %arrayidx = getelementptr inbounds float* %A, i64 1 ; <float*> [#uses=1]
- %tmp2 = load float* %arrayidx ; <float> [#uses=1]
+ %arrayidx = getelementptr inbounds float, float* %A, i64 1 ; <float*> [#uses=1]
+ %tmp2 = load float, float* %arrayidx ; <float> [#uses=1]
ret float %tmp2
; CHECK-LABEL: @memcpy_to_float_local_as1(
; CHECK-NOT: load
@@ -237,7 +237,7 @@ F:
br label %Cont
Cont:
- %A = load i8* %P3
+ %A = load i8, i8* %P3
ret i8 %A
; CHECK-LABEL: @coerce_mustalias_nonlocal0(
@@ -263,7 +263,7 @@ F:
Cont:
%P3 = bitcast i32* %P to i8*
- %A = load i8* %P3
+ %A = load i8, i8* %P3
ret i8 %A
; CHECK-LABEL: @coerce_mustalias_nonlocal1(
@@ -286,12 +286,12 @@ F:
br label %Cont
Cont:
- %A = load i8* %P3
+ %A = load i8, i8* %P3
ret i8 %A
; CHECK-LABEL: @coerce_mustalias_pre0(
; CHECK: F:
-; CHECK: load i8* %P3
+; CHECK: load i8, i8* %P3
; CHECK: Cont:
; CHECK: %A = phi i8 [
; CHECK-NOT: load
@@ -309,9 +309,9 @@ define i8 @coerce_offset0(i32 %V, i32* %P) {
store i32 %V, i32* %P
%P2 = bitcast i32* %P to i8*
- %P3 = getelementptr i8* %P2, i32 2
+ %P3 = getelementptr i8, i8* %P2, i32 2
- %A = load i8* %P3
+ %A = load i8, i8* %P3
ret i8 %A
; CHECK-LABEL: @coerce_offset0(
; CHECK-NOT: load
@@ -322,9 +322,9 @@ define i8 @coerce_offset0_addrspacecast(i32 %V, i32* %P) {
store i32 %V, i32* %P
%P2 = addrspacecast i32* %P to i8 addrspace(1)*
- %P3 = getelementptr i8 addrspace(1)* %P2, i32 2
+ %P3 = getelementptr i8, i8 addrspace(1)* %P2, i32 2
- %A = load i8 addrspace(1)* %P3
+ %A = load i8, i8 addrspace(1)* %P3
ret i8 %A
; CHECK-LABEL: @coerce_offset0_addrspacecast(
; CHECK-NOT: load
@@ -335,7 +335,7 @@ define i8 @coerce_offset0_addrspacecast(i32 %V, i32* %P) {
define i8 @coerce_offset_nonlocal0(i32* %P, i1 %cond) {
%P2 = bitcast i32* %P to float*
%P3 = bitcast i32* %P to i8*
- %P4 = getelementptr i8* %P3, i32 2
+ %P4 = getelementptr i8, i8* %P3, i32 2
br i1 %cond, label %T, label %F
T:
store i32 57005, i32* %P
@@ -346,7 +346,7 @@ F:
br label %Cont
Cont:
- %A = load i8* %P4
+ %A = load i8, i8* %P4
ret i8 %A
; CHECK-LABEL: @coerce_offset_nonlocal0(
@@ -360,7 +360,7 @@ Cont:
;; non-local i32 -> i8 partial redundancy load forwarding.
define i8 @coerce_offset_pre0(i32* %P, i1 %cond) {
%P3 = bitcast i32* %P to i8*
- %P4 = getelementptr i8* %P3, i32 2
+ %P4 = getelementptr i8, i8* %P3, i32 2
br i1 %cond, label %T, label %F
T:
store i32 42, i32* %P
@@ -370,12 +370,12 @@ F:
br label %Cont
Cont:
- %A = load i8* %P4
+ %A = load i8, i8* %P4
ret i8 %A
; CHECK-LABEL: @coerce_offset_pre0(
; CHECK: F:
-; CHECK: load i8* %P4
+; CHECK: load i8, i8* %P4
; CHECK: Cont:
; CHECK: %A = phi i8 [
; CHECK-NOT: load
@@ -386,28 +386,28 @@ define i32 @chained_load(i32** %p, i32 %x, i32 %y) {
block1:
%A = alloca i32*
- %z = load i32** %p
+ %z = load i32*, i32** %p
store i32* %z, i32** %A
%cmp = icmp eq i32 %x, %y
br i1 %cmp, label %block2, label %block3
block2:
- %a = load i32** %p
+ %a = load i32*, i32** %p
br label %block4
block3:
- %b = load i32** %p
+ %b = load i32*, i32** %p
br label %block4
block4:
- %c = load i32** %p
- %d = load i32* %c
+ %c = load i32*, i32** %p
+ %d = load i32, i32* %c
ret i32 %d
; CHECK-LABEL: @chained_load(
-; CHECK: %z = load i32** %p
+; CHECK: %z = load i32*, i32** %p
; CHECK-NOT: load
-; CHECK: %d = load i32* %z
+; CHECK: %d = load i32, i32* %z
; CHECK-NEXT: ret i32 %d
}
@@ -427,13 +427,13 @@ F1:
br i1 %cond2, label %T1, label %TY
T1:
- %P2 = getelementptr i32* %P, i32 %A
- %x = load i32* %P2
+ %P2 = getelementptr i32, i32* %P, i32 %A
+ %x = load i32, i32* %P2
%cond = call i1 @cond2()
br i1 %cond, label %TX, label %F
F:
- %P3 = getelementptr i32* %P, i32 2
+ %P3 = getelementptr i32, i32* %P, i32 2
store i32 17, i32* %P3
store i32 42, i32* %P2 ; Provides "P[A]".
@@ -464,7 +464,7 @@ block2:
br label %block4
block3:
- %p2 = getelementptr i32* %p, i32 43
+ %p2 = getelementptr i32, i32* %p, i32 43
store i32 97, i32* %p2
br label %block4
@@ -481,11 +481,11 @@ block5:
br i1 %cmpxy, label %block6, label %exit
block6:
- %C = getelementptr i32* %p, i32 %B
+ %C = getelementptr i32, i32* %p, i32 %B
br i1 %cmpxy, label %block7, label %exit
block7:
- %D = load i32* %C
+ %D = load i32, i32* %C
ret i32 %D
; CHECK: block7:
@@ -498,17 +498,17 @@ exit:
define i8 @phi_trans4(i8* %p) {
; CHECK-LABEL: @phi_trans4(
entry:
- %X3 = getelementptr i8* %p, i32 192
+ %X3 = getelementptr i8, i8* %p, i32 192
store i8 192, i8* %X3
- %X = getelementptr i8* %p, i32 4
- %Y = load i8* %X
+ %X = getelementptr i8, i8* %p, i32 4
+ %Y = load i8, i8* %X
br label %loop
loop:
%i = phi i32 [4, %entry], [192, %loop]
- %X2 = getelementptr i8* %p, i32 %i
- %Y2 = load i8* %X2
+ %X2 = getelementptr i8, i8* %p, i32 %i
+ %Y2 = load i8, i8* %X2
; CHECK: loop:
; CHECK-NEXT: %Y2 = phi i8 [ %Y, %entry ], [ 0, %loop ]
@@ -529,29 +529,29 @@ define i8 @phi_trans5(i8* %p) {
; CHECK-LABEL: @phi_trans5(
entry:
- %X4 = getelementptr i8* %p, i32 2
+ %X4 = getelementptr i8, i8* %p, i32 2
store i8 19, i8* %X4
- %X = getelementptr i8* %p, i32 4
- %Y = load i8* %X
+ %X = getelementptr i8, i8* %p, i32 4
+ %Y = load i8, i8* %X
br label %loop
loop:
%i = phi i32 [4, %entry], [3, %cont]
- %X2 = getelementptr i8* %p, i32 %i
- %Y2 = load i8* %X2 ; Ensure this load is not being incorrectly replaced.
+ %X2 = getelementptr i8, i8* %p, i32 %i
+ %Y2 = load i8, i8* %X2 ; Ensure this load is not being incorrectly replaced.
%cond = call i1 @cond2()
br i1 %cond, label %cont, label %out
cont:
- %Z = getelementptr i8* %X2, i32 -1
+ %Z = getelementptr i8, i8* %X2, i32 -1
%Z2 = bitcast i8 *%Z to i32*
store i32 50462976, i32* %Z2 ;; (1 << 8) | (2 << 16) | (3 << 24)
; CHECK: store i32
-; CHECK-NEXT: getelementptr i8* %p, i32 3
-; CHECK-NEXT: load i8*
+; CHECK-NEXT: getelementptr i8, i8* %p, i32 3
+; CHECK-NEXT: load i8, i8*
br label %loop
out:
@@ -566,8 +566,8 @@ entry:
%x = alloca [256 x i32], align 4 ; <[256 x i32]*> [#uses=2]
%tmp = bitcast [256 x i32]* %x to i8* ; <i8*> [#uses=1]
call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 1024, i32 4, i1 false)
- %arraydecay = getelementptr inbounds [256 x i32]* %x, i32 0, i32 0 ; <i32*>
- %tmp1 = load i32* %arraydecay ; <i32> [#uses=1]
+ %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %x, i32 0, i32 0 ; <i32*>
+ %tmp1 = load i32, i32* %arraydecay ; <i32> [#uses=1]
ret i32 %tmp1
; CHECK-LABEL: @memset_to_load(
; CHECK: ret i32 0
@@ -581,15 +581,15 @@ entry:
define i32 @load_load_partial_alias(i8* %P) nounwind ssp {
entry:
%0 = bitcast i8* %P to i32*
- %tmp2 = load i32* %0
- %add.ptr = getelementptr inbounds i8* %P, i64 1
- %tmp5 = load i8* %add.ptr
+ %tmp2 = load i32, i32* %0
+ %add.ptr = getelementptr inbounds i8, i8* %P, i64 1
+ %tmp5 = load i8, i8* %add.ptr
%conv = zext i8 %tmp5 to i32
%add = add nsw i32 %tmp2, %conv
ret i32 %add
; TEMPORARILYDISABLED-LABEL: @load_load_partial_alias(
-; TEMPORARILYDISABLED: load i32*
+; TEMPORARILYDISABLED: load i32, i32*
; TEMPORARILYDISABLED-NOT: load
; TEMPORARILYDISABLED: lshr i32 {{.*}}, 8
; TEMPORARILYDISABLED-NOT: load
@@ -603,13 +603,13 @@ entry:
define i32 @load_load_partial_alias_cross_block(i8* %P) nounwind ssp {
entry:
%xx = bitcast i8* %P to i32*
- %x1 = load i32* %xx, align 4
+ %x1 = load i32, i32* %xx, align 4
%cmp = icmp eq i32 %x1, 127
br i1 %cmp, label %land.lhs.true, label %if.end
land.lhs.true: ; preds = %entry
- %arrayidx4 = getelementptr inbounds i8* %P, i64 1
- %tmp5 = load i8* %arrayidx4, align 1
+ %arrayidx4 = getelementptr inbounds i8, i8* %P, i64 1
+ %tmp5 = load i8, i8* %arrayidx4, align 1
%conv6 = zext i8 %tmp5 to i32
ret i32 %conv6
@@ -632,39 +632,39 @@ if.end:
define i32 @test_widening1(i8* %P) nounwind ssp noredzone {
entry:
- %tmp = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 1), align 4
+ %tmp = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 1), align 4
%conv = zext i8 %tmp to i32
- %tmp1 = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 2), align 1
+ %tmp1 = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 2), align 1
%conv2 = zext i8 %tmp1 to i32
%add = add nsw i32 %conv, %conv2
ret i32 %add
; CHECK-LABEL: @test_widening1(
; CHECK-NOT: load
-; CHECK: load i16*
+; CHECK: load i16, i16*
; CHECK-NOT: load
; CHECK: ret i32
}
define i32 @test_widening2() nounwind ssp noredzone {
entry:
- %tmp = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 1), align 4
+ %tmp = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 1), align 4
%conv = zext i8 %tmp to i32
- %tmp1 = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 2), align 1
+ %tmp1 = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 2), align 1
%conv2 = zext i8 %tmp1 to i32
%add = add nsw i32 %conv, %conv2
- %tmp2 = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 3), align 2
+ %tmp2 = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 3), align 2
%conv3 = zext i8 %tmp2 to i32
%add2 = add nsw i32 %add, %conv3
- %tmp3 = load i8* getelementptr inbounds (%widening1* @f, i64 0, i32 4), align 1
+ %tmp3 = load i8, i8* getelementptr inbounds (%widening1, %widening1* @f, i64 0, i32 4), align 1
%conv4 = zext i8 %tmp3 to i32
%add3 = add nsw i32 %add2, %conv3
ret i32 %add3
; CHECK-LABEL: @test_widening2(
; CHECK-NOT: load
-; CHECK: load i32*
+; CHECK: load i32, i32*
; CHECK-NOT: load
; CHECK: ret i32
}
@@ -691,9 +691,9 @@ declare void @use3(i8***, i8**)
; PR8908
define void @test_escape1() nounwind {
%x = alloca i8**, align 8
- store i8** getelementptr inbounds ([5 x i8*]* @_ZTV1X, i64 0, i64 2), i8*** %x, align 8
+ store i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @_ZTV1X, i64 0, i64 2), i8*** %x, align 8
call void @use() nounwind
- %DEAD = load i8*** %x, align 8
+ %DEAD = load i8**, i8*** %x, align 8
call void @use3(i8*** %x, i8** %DEAD) nounwind
ret void
; CHECK: test_escape1
diff --git a/test/Transforms/GVN/tbaa.ll b/test/Transforms/GVN/tbaa.ll
index 71fbed41..b5a717b 100644
--- a/test/Transforms/GVN/tbaa.ll
+++ b/test/Transforms/GVN/tbaa.ll
@@ -81,9 +81,9 @@ define i32 @test8(i32* %p, i32* %q) {
; Since we know the location is invariant, we can forward the
; load across the potentially aliasing store.
- %a = load i32* %q, !tbaa !10
+ %a = load i32, i32* %q, !tbaa !10
store i32 15, i32* %p
- %b = load i32* %q, !tbaa !10
+ %b = load i32, i32* %q, !tbaa !10
%c = sub i32 %a, %b
ret i32 %c
}
@@ -94,9 +94,9 @@ define i32 @test9(i32* %p, i32* %q) {
; Since we know the location is invariant, we can forward the
; load across the potentially aliasing store (within the call).
- %a = load i32* %q, !tbaa !10
+ %a = load i32, i32* %q, !tbaa !10
call void @clobber()
- %b = load i32* %q, !tbaa !10
+ %b = load i32, i32* %q, !tbaa !10
%c = sub i32 %a, %b
ret i32 %c
}
diff --git a/test/Transforms/GVN/volatile.ll b/test/Transforms/GVN/volatile.ll
index 5ba03d9..b31058d 100644
--- a/test/Transforms/GVN/volatile.ll
+++ b/test/Transforms/GVN/volatile.ll
@@ -6,12 +6,12 @@
; for dependencies of a non-volatile load
define i32 @test1(i32* nocapture %p, i32* nocapture %q) {
; CHECK-LABEL: test1
-; CHECK: %0 = load volatile i32* %q
+; CHECK: %0 = load volatile i32, i32* %q
; CHECK-NEXT: ret i32 0
entry:
- %x = load i32* %p
- load volatile i32* %q
- %y = load i32* %p
+ %x = load i32, i32* %p
+ load volatile i32, i32* %q
+ %y = load i32, i32* %p
%add = sub i32 %y, %x
ret i32 %add
}
@@ -20,12 +20,12 @@ entry:
; volatile, this would be (in effect) removing the volatile load
define i32 @test2(i32* nocapture %p, i32* nocapture %q) {
; CHECK-LABEL: test2
-; CHECK: %x = load i32* %p
-; CHECK-NEXT: %y = load volatile i32* %p
+; CHECK: %x = load i32, i32* %p
+; CHECK-NEXT: %y = load volatile i32, i32* %p
; CHECK-NEXT: %add = sub i32 %y, %x
entry:
- %x = load i32* %p
- %y = load volatile i32* %p
+ %x = load i32, i32* %p
+ %y = load volatile i32, i32* %p
%add = sub i32 %y, %x
ret i32 %add
}
@@ -34,13 +34,13 @@ entry:
; reorder it even if p and q are noalias
define i32 @test3(i32* noalias nocapture %p, i32* noalias nocapture %q) {
; CHECK-LABEL: test3
-; CHECK: %x = load i32* %p
-; CHECK-NEXT: %0 = load volatile i32* %q
-; CHECK-NEXT: %y = load volatile i32* %p
+; CHECK: %x = load i32, i32* %p
+; CHECK-NEXT: %0 = load volatile i32, i32* %q
+; CHECK-NEXT: %y = load volatile i32, i32* %p
entry:
- %x = load i32* %p
- load volatile i32* %q
- %y = load volatile i32* %p
+ %x = load i32, i32* %p
+ load volatile i32, i32* %q
+ %y = load volatile i32, i32* %p
%add = sub i32 %y, %x
ret i32 %add
}
@@ -50,13 +50,13 @@ entry:
; case, the ordering prevents forwarding.
define i32 @test4(i32* noalias nocapture %p, i32* noalias nocapture %q) {
; CHECK-LABEL: test4
-; CHECK: %x = load i32* %p
-; CHECK-NEXT: %0 = load atomic volatile i32* %q seq_cst
-; CHECK-NEXT: %y = load atomic i32* %p seq_cst
+; CHECK: %x = load i32, i32* %p
+; CHECK-NEXT: %0 = load atomic volatile i32, i32* %q seq_cst
+; CHECK-NEXT: %y = load atomic i32, i32* %p seq_cst
entry:
- %x = load i32* %p
- load atomic volatile i32* %q seq_cst, align 4
- %y = load atomic i32* %p seq_cst, align 4
+ %x = load i32, i32* %p
+ load atomic volatile i32, i32* %q seq_cst, align 4
+ %y = load atomic i32, i32* %p seq_cst, align 4
%add = sub i32 %y, %x
ret i32 %add
}
@@ -64,11 +64,11 @@ entry:
; Value forwarding from a volatile load is perfectly legal
define i32 @test5(i32* nocapture %p, i32* nocapture %q) {
; CHECK-LABEL: test5
-; CHECK: %x = load volatile i32* %p
+; CHECK: %x = load volatile i32, i32* %p
; CHECK-NEXT: ret i32 0
entry:
- %x = load volatile i32* %p
- %y = load i32* %p
+ %x = load volatile i32, i32* %p
+ %y = load i32, i32* %p
%add = sub i32 %y, %x
ret i32 %add
}
@@ -76,17 +76,17 @@ entry:
; Does cross block redundancy elimination work with volatiles?
define i32 @test6(i32* noalias nocapture %p, i32* noalias nocapture %q) {
; CHECK-LABEL: test6
-; CHECK: %y1 = load i32* %p
+; CHECK: %y1 = load i32, i32* %p
; CHECK-LABEL: header
-; CHECK: %x = load volatile i32* %q
+; CHECK: %x = load volatile i32, i32* %q
; CHECK-NEXT: %add = sub i32 %y1, %x
entry:
- %y1 = load i32* %p
+ %y1 = load i32, i32* %p
call void @use(i32 %y1)
br label %header
header:
- %x = load volatile i32* %q
- %y = load i32* %p
+ %x = load volatile i32, i32* %q
+ %y = load i32, i32* %p
%add = sub i32 %y, %x
%cnd = icmp eq i32 %add, 0
br i1 %cnd, label %exit, label %header
@@ -98,22 +98,22 @@ exit:
define i32 @test7(i1 %c, i32* noalias nocapture %p, i32* noalias nocapture %q) {
; CHECK-LABEL: test7
; CHECK-LABEL: entry.header_crit_edge:
-; CHECK: %y.pre = load i32* %p
+; CHECK: %y.pre = load i32, i32* %p
; CHECK-LABEL: skip:
-; CHECK: %y1 = load i32* %p
+; CHECK: %y1 = load i32, i32* %p
; CHECK-LABEL: header:
; CHECK: %y = phi i32
-; CHECK-NEXT: %x = load volatile i32* %q
+; CHECK-NEXT: %x = load volatile i32, i32* %q
; CHECK-NEXT: %add = sub i32 %y, %x
entry:
br i1 %c, label %header, label %skip
skip:
- %y1 = load i32* %p
+ %y1 = load i32, i32* %p
call void @use(i32 %y1)
br label %header
header:
- %x = load volatile i32* %q
- %y = load i32* %p
+ %x = load volatile i32, i32* %q
+ %y = load i32, i32* %p
%add = sub i32 %y, %x
%cnd = icmp eq i32 %add, 0
br i1 %cnd, label %exit, label %header
@@ -126,20 +126,20 @@ exit:
define i32 @test8(i1 %b, i1 %c, i32* noalias %p, i32* noalias %q) {
; CHECK-LABEL: test8
; CHECK-LABEL: entry
-; CHECK: %y1 = load i32* %p
+; CHECK: %y1 = load i32, i32* %p
; CHECK-LABEL: header:
; CHECK: %y = phi i32
-; CHECK-NEXT: %x = load volatile i32* %q
+; CHECK-NEXT: %x = load volatile i32, i32* %q
; CHECK-NOT: load
; CHECK-LABEL: skip.header_crit_edge:
-; CHECK: %y.pre = load i32* %p
+; CHECK: %y.pre = load i32, i32* %p
entry:
- %y1 = load i32* %p
+ %y1 = load i32, i32* %p
call void @use(i32 %y1)
br label %header
header:
- %x = load volatile i32* %q
- %y = load i32* %p
+ %x = load volatile i32, i32* %q
+ %y = load i32, i32* %p
call void @use(i32 %y)
br i1 %b, label %skip, label %header
skip: