aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/JumpThreading
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/JumpThreading')
-rw-r--r--test/Transforms/JumpThreading/2010-08-26-and.ll20
-rw-r--r--test/Transforms/JumpThreading/2011-04-14-InfLoop.ll2
-rw-r--r--test/Transforms/JumpThreading/crash.ll2
-rw-r--r--test/Transforms/JumpThreading/indirectbr.ll6
-rw-r--r--test/Transforms/JumpThreading/landing-pad.ll60
-rw-r--r--test/Transforms/JumpThreading/lvi-load.ll6
-rw-r--r--test/Transforms/JumpThreading/or-undef.ll8
-rw-r--r--test/Transforms/JumpThreading/phi-eq.ll54
-rw-r--r--test/Transforms/JumpThreading/select.ll4
-rw-r--r--test/Transforms/JumpThreading/thread-loads.ll10
10 files changed, 86 insertions, 86 deletions
diff --git a/test/Transforms/JumpThreading/2010-08-26-and.ll b/test/Transforms/JumpThreading/2010-08-26-and.ll
index 2d6caf7..c0a6b47 100644
--- a/test/Transforms/JumpThreading/2010-08-26-and.ll
+++ b/test/Transforms/JumpThreading/2010-08-26-and.ll
@@ -29,8 +29,8 @@ land.lhs.true.i: ; preds = %_ZN12StringSwitchI5
%retval.0.i.pre161 = phi i32 [ undef, %bb.nph ], [ %retval.0.i.pre, %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit134 ] ; <i32> [#uses=3]
%indvar = phi i64 [ 0, %bb.nph ], [ %tmp146, %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit134 ] ; <i64> [#uses=1]
%tmp146 = add i64 %indvar, 1 ; <i64> [#uses=3]
- %arrayidx = getelementptr i8** %argv, i64 %tmp146 ; <i8**> [#uses=1]
- %tmp6 = load i8** %arrayidx, align 8 ; <i8*> [#uses=8]
+ %arrayidx = getelementptr i8*, i8** %argv, i64 %tmp146 ; <i8**> [#uses=1]
+ %tmp6 = load i8*, i8** %arrayidx, align 8 ; <i8*> [#uses=8]
%call.i.i = call i64 @strlen(i8* %tmp6) nounwind ; <i64> [#uses=1]
%conv.i.i = trunc i64 %call.i.i to i32 ; <i32> [#uses=6]\
; CHECK: switch i32 %conv.i.i
@@ -42,7 +42,7 @@ land.lhs.true.i: ; preds = %_ZN12StringSwitchI5
]
land.lhs.true5.i: ; preds = %land.lhs.true.i
- %call.i = call i32 @memcmp(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i8* %tmp6, i64 4) nounwind ; <i32> [#uses=1]
+ %call.i = call i32 @memcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %tmp6, i64 4) nounwind ; <i32> [#uses=1]
%cmp9.i = icmp eq i32 %call.i, 0 ; <i1> [#uses=1]
br i1 %cmp9.i, label %_ZN12StringSwitchI5ColorE4CaseILj4EEERS1_RAT__KcRKS0_.exit, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit
@@ -50,7 +50,7 @@ _ZN12StringSwitchI5ColorE4CaseILj4EEERS1_RAT__KcRKS0_.exit: ; preds = %land.lhs.
br label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit
land.lhs.true5.i37: ; preds = %land.lhs.true.i
- %call.i35 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8]* @.str1, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
+ %call.i35 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str1, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
%cmp9.i36 = icmp eq i32 %call.i35, 0 ; <i1> [#uses=1]
br i1 %cmp9.i36, label %if.then.i40, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit
@@ -66,7 +66,7 @@ _ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit: ; preds = %if.then.i
br i1 %or.cond, label %land.lhs.true5.i55, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit60
land.lhs.true5.i55: ; preds = %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit
- %call.i53 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8]* @.str2, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
+ %call.i53 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str2, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
%cmp9.i54 = icmp eq i32 %call.i53, 0 ; <i1> [#uses=1]
br i1 %cmp9.i54, label %if.then.i58, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit60
@@ -83,7 +83,7 @@ _ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit60: ; preds = %if.then
br i1 %or.cond168, label %land.lhs.true5.i74, label %_ZN12StringSwitchI5ColorE4CaseILj6EEERS1_RAT__KcRKS0_.exit
land.lhs.true5.i74: ; preds = %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit60
- %call.i72 = call i32 @memcmp(i8* getelementptr inbounds ([6 x i8]* @.str3, i64 0, i64 0), i8* %tmp6, i64 6) nounwind ; <i32> [#uses=1]
+ %call.i72 = call i32 @memcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str3, i64 0, i64 0), i8* %tmp6, i64 6) nounwind ; <i32> [#uses=1]
%cmp9.i73 = icmp eq i32 %call.i72, 0 ; <i1> [#uses=1]
br i1 %cmp9.i73, label %if.then.i77, label %_ZN12StringSwitchI5ColorE4CaseILj6EEERS1_RAT__KcRKS0_.exit
@@ -100,7 +100,7 @@ _ZN12StringSwitchI5ColorE4CaseILj6EEERS1_RAT__KcRKS0_.exit: ; preds = %if.then.i
br i1 %or.cond169, label %land.lhs.true5.i92, label %_ZN12StringSwitchI5ColorE4CaseILj5EEERS1_RAT__KcRKS0_.exit
land.lhs.true5.i92: ; preds = %_ZN12StringSwitchI5ColorE4CaseILj6EEERS1_RAT__KcRKS0_.exit
- %call.i90 = call i32 @memcmp(i8* getelementptr inbounds ([5 x i8]* @.str4, i64 0, i64 0), i8* %tmp6, i64 5) nounwind ; <i32> [#uses=1]
+ %call.i90 = call i32 @memcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str4, i64 0, i64 0), i8* %tmp6, i64 5) nounwind ; <i32> [#uses=1]
%cmp9.i91 = icmp eq i32 %call.i90, 0 ; <i1> [#uses=1]
br i1 %cmp9.i91, label %if.then.i95, label %_ZN12StringSwitchI5ColorE4CaseILj5EEERS1_RAT__KcRKS0_.exit
@@ -117,7 +117,7 @@ _ZN12StringSwitchI5ColorE4CaseILj5EEERS1_RAT__KcRKS0_.exit: ; preds = %if.then.i
br i1 %or.cond170, label %land.lhs.true5.i110, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit115
land.lhs.true5.i110: ; preds = %_ZN12StringSwitchI5ColorE4CaseILj5EEERS1_RAT__KcRKS0_.exit
- %call.i108 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8]* @.str5, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
+ %call.i108 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str5, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
%cmp9.i109 = icmp eq i32 %call.i108, 0 ; <i1> [#uses=1]
br i1 %cmp9.i109, label %if.then.i113, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit115
@@ -134,7 +134,7 @@ _ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit115: ; preds = %if.the
br i1 %or.cond171, label %land.lhs.true5.i129, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit134
land.lhs.true5.i129: ; preds = %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit115
- %call.i127 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8]* @.str6, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
+ %call.i127 = call i32 @memcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str6, i64 0, i64 0), i8* %tmp6, i64 7) nounwind ; <i32> [#uses=1]
%cmp9.i128 = icmp eq i32 %call.i127, 0 ; <i1> [#uses=1]
br i1 %cmp9.i128, label %if.then.i132, label %_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit134
@@ -147,7 +147,7 @@ _ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit134: ; preds = %if.the
%tmp7.i138 = and i8 %tmp2.i137, 1 ; <i8> [#uses=1]
%tobool.i139 = icmp eq i8 %tmp7.i138, 0 ; <i1> [#uses=1]
%retval.0.i = select i1 %tobool.i139, i32 0, i32 %retval.0.i.pre ; <i32> [#uses=1]
- %call22 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str7, i64 0, i64 0), i32 %retval.0.i) ; <i32> [#uses=0]
+ %call22 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str7, i64 0, i64 0), i32 %retval.0.i) ; <i32> [#uses=0]
%exitcond = icmp eq i64 %tmp146, %tmp145 ; <i1> [#uses=1]
br i1 %exitcond, label %for.end, label %land.lhs.true.i
diff --git a/test/Transforms/JumpThreading/2011-04-14-InfLoop.ll b/test/Transforms/JumpThreading/2011-04-14-InfLoop.ll
index 86a1321..0323723 100644
--- a/test/Transforms/JumpThreading/2011-04-14-InfLoop.ll
+++ b/test/Transforms/JumpThreading/2011-04-14-InfLoop.ll
@@ -15,7 +15,7 @@ for.cond1177:
br i1 %cmp1179, label %for.cond1177, label %land.rhs1320
land.rhs1320:
- %tmp1324 = load volatile i64* getelementptr inbounds (%0* @g_338, i64 0, i32 2), align 1
+ %tmp1324 = load volatile i64, i64* getelementptr inbounds (%0, %0* @g_338, i64 0, i32 2), align 1
br label %if.end.i
if.end.i:
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll
index 2fe8746..900a773 100644
--- a/test/Transforms/JumpThreading/crash.ll
+++ b/test/Transforms/JumpThreading/crash.ll
@@ -356,7 +356,7 @@ B2:
br label %BrBlock
BrBlock:
- %L = load i32* %P
+ %L = load i32, i32* %P
%C = icmp eq i32 %L, 42
br i1 %C, label %T, label %F
diff --git a/test/Transforms/JumpThreading/indirectbr.ll b/test/Transforms/JumpThreading/indirectbr.ll
index b87fb6c..59f393a 100644
--- a/test/Transforms/JumpThreading/indirectbr.ll
+++ b/test/Transforms/JumpThreading/indirectbr.ll
@@ -79,15 +79,15 @@ entry:
br label %__here
__here: ; preds = %entry
- %call = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here) to i64)) nounwind noredzone
+ %call = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here) to i64)) nounwind noredzone
br label %__here1
__here1: ; preds = %__here
- %call2 = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here1) to i64)) nounwind noredzone
+ %call2 = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here1) to i64)) nounwind noredzone
br label %__here3
__here3: ; preds = %__here1
- %call4 = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here3) to i64)) nounwind noredzone
+ %call4 = call i32 (...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (i8* blockaddress(@test3, %__here3) to i64)) nounwind noredzone
ret void
}
diff --git a/test/Transforms/JumpThreading/landing-pad.ll b/test/Transforms/JumpThreading/landing-pad.ll
index 9ee0526..4d49db0 100644
--- a/test/Transforms/JumpThreading/landing-pad.ll
+++ b/test/Transforms/JumpThreading/landing-pad.ll
@@ -13,8 +13,8 @@
define void @_ZN15EditCommandImpl5applyEv(%class.E* %this) uwtable align 2 {
entry:
%0 = bitcast %class.E* %this to void (%class.E*)***
- %vtable = load void (%class.E*)*** %0, align 8
- %1 = load void (%class.E*)** %vtable, align 8
+ %vtable = load void (%class.E*)**, void (%class.E*)*** %0, align 8
+ %1 = load void (%class.E*)*, void (%class.E*)** %vtable, align 8
call void %1(%class.E* %this)
ret void
}
@@ -22,16 +22,16 @@ entry:
define void @_ZN1DC1Ev(%class.D* nocapture %this) unnamed_addr uwtable align 2 {
entry:
call void @_ZN24CompositeEditCommandImplC2Ev()
- %0 = getelementptr inbounds %class.D* %this, i64 0, i32 0, i32 0, i32 0
- store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
+ %0 = getelementptr inbounds %class.D, %class.D* %this, i64 0, i32 0, i32 0, i32 0
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
ret void
}
define void @_ZN1DC2Ev(%class.D* nocapture %this) unnamed_addr uwtable align 2 {
entry:
call void @_ZN24CompositeEditCommandImplC2Ev()
- %0 = getelementptr inbounds %class.D* %this, i64 0, i32 0, i32 0, i32 0
- store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
+ %0 = getelementptr inbounds %class.D, %class.D* %this, i64 0, i32 0, i32 0, i32 0
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
ret void
}
@@ -50,10 +50,10 @@ entry:
_ZN1DC1Ev.exit: ; preds = %entry
%0 = bitcast i8* %call to i32 (...)***
- store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
- %_ref.i.i.i = getelementptr inbounds i8* %call, i64 8
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTV1D, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, align 8
+ %_ref.i.i.i = getelementptr inbounds i8, i8* %call, i64 8
%1 = bitcast i8* %_ref.i.i.i to i32*
- %2 = load i32* %1, align 4
+ %2 = load i32, i32* %1, align 4
%inc.i.i.i = add nsw i32 %2, 1
store i32 %inc.i.i.i, i32* %1, align 4
%3 = bitcast i8* %call to %class.D*
@@ -76,7 +76,7 @@ lpad: ; preds = %entry
lpad1: ; preds = %_ZN1DC1Ev.exit, %_ZN15EditCommandImpl5applyEv.exit
%5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
cleanup
- %6 = load i32* %1, align 4
+ %6 = load i32, i32* %1, align 4
%tobool.i.i.i = icmp eq i32 %6, 0
br i1 %tobool.i.i.i, label %_ZN1BI1DED1Ev.exit, label %if.then.i.i.i
@@ -98,10 +98,10 @@ terminate.lpad: ; No predecessors!
define void @_ZN1BI1DEC1EPS0_(%class.B* nocapture %this, %class.D* %p1) unnamed_addr uwtable align 2 {
entry:
- %m_ptr.i = getelementptr inbounds %class.B* %this, i64 0, i32 0
+ %m_ptr.i = getelementptr inbounds %class.B, %class.B* %this, i64 0, i32 0
store %class.D* %p1, %class.D** %m_ptr.i, align 8
- %_ref.i.i = getelementptr inbounds %class.D* %p1, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
- %0 = load i32* %_ref.i.i, align 4
+ %_ref.i.i = getelementptr inbounds %class.D, %class.D* %p1, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
+ %0 = load i32, i32* %_ref.i.i, align 4
%inc.i.i = add nsw i32 %0, 1
store i32 %inc.i.i, i32* %_ref.i.i, align 4
ret void
@@ -115,8 +115,8 @@ declare void @_ZdlPv()
define %class.D* @_ZN1BI1DEptEv(%class.B* nocapture readonly %this) nounwind readonly uwtable align 2 {
entry:
- %m_ptr = getelementptr inbounds %class.B* %this, i64 0, i32 0
- %0 = load %class.D** %m_ptr, align 8
+ %m_ptr = getelementptr inbounds %class.B, %class.B* %this, i64 0, i32 0
+ %0 = load %class.D*, %class.D** %m_ptr, align 8
ret %class.D* %0
}
@@ -124,10 +124,10 @@ declare void @_ZN1D16deleteKeyPressedEv()
define void @_ZN1BI1DED1Ev(%class.B* nocapture readonly %this) unnamed_addr uwtable align 2 {
entry:
- %m_ptr.i = getelementptr inbounds %class.B* %this, i64 0, i32 0
- %0 = load %class.D** %m_ptr.i, align 8
- %_ref.i.i = getelementptr inbounds %class.D* %0, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
- %1 = load i32* %_ref.i.i, align 4
+ %m_ptr.i = getelementptr inbounds %class.B, %class.B* %this, i64 0, i32 0
+ %0 = load %class.D*, %class.D** %m_ptr.i, align 8
+ %_ref.i.i = getelementptr inbounds %class.D, %class.D* %0, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
+ %1 = load i32, i32* %_ref.i.i, align 4
%tobool.i.i = icmp eq i32 %1, 0
br i1 %tobool.i.i, label %_ZN1BI1DED2Ev.exit, label %if.then.i.i
@@ -146,10 +146,10 @@ declare hidden void @__clang_call_terminate()
define void @_ZN1BI1DED2Ev(%class.B* nocapture readonly %this) unnamed_addr uwtable align 2 {
entry:
- %m_ptr = getelementptr inbounds %class.B* %this, i64 0, i32 0
- %0 = load %class.D** %m_ptr, align 8
- %_ref.i = getelementptr inbounds %class.D* %0, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
- %1 = load i32* %_ref.i, align 4
+ %m_ptr = getelementptr inbounds %class.B, %class.B* %this, i64 0, i32 0
+ %0 = load %class.D*, %class.D** %m_ptr, align 8
+ %_ref.i = getelementptr inbounds %class.D, %class.D* %0, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
+ %1 = load i32, i32* %_ref.i, align 4
%tobool.i = icmp eq i32 %1, 0
br i1 %tobool.i, label %_ZN1AI1CE5derefEv.exit, label %if.then.i
@@ -166,8 +166,8 @@ _ZN1AI1CE5derefEv.exit: ; preds = %entry, %if.then.i
define void @_ZN1AI1CE5derefEv(%class.A* nocapture readonly %this) nounwind uwtable align 2 {
entry:
- %_ref = getelementptr inbounds %class.A* %this, i64 0, i32 0
- %0 = load i32* %_ref, align 4
+ %_ref = getelementptr inbounds %class.A, %class.A* %this, i64 0, i32 0
+ %0 = load i32, i32* %_ref, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %if.end, label %if.then
@@ -184,10 +184,10 @@ if.end: ; preds = %entry, %if.then
define void @_ZN1BI1DEC2EPS0_(%class.B* nocapture %this, %class.D* %p1) unnamed_addr uwtable align 2 {
entry:
- %m_ptr = getelementptr inbounds %class.B* %this, i64 0, i32 0
+ %m_ptr = getelementptr inbounds %class.B, %class.B* %this, i64 0, i32 0
store %class.D* %p1, %class.D** %m_ptr, align 8
- %_ref.i = getelementptr inbounds %class.D* %p1, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
- %0 = load i32* %_ref.i, align 4
+ %_ref.i = getelementptr inbounds %class.D, %class.D* %p1, i64 0, i32 0, i32 0, i32 1, i32 0, i32 0
+ %0 = load i32, i32* %_ref.i, align 4
%inc.i = add nsw i32 %0, 1
store i32 %inc.i, i32* %_ref.i, align 4
ret void
@@ -195,8 +195,8 @@ entry:
define void @_ZN1AI1CE3refEv(%class.A* nocapture %this) nounwind uwtable align 2 {
entry:
- %_ref = getelementptr inbounds %class.A* %this, i64 0, i32 0
- %0 = load i32* %_ref, align 4
+ %_ref = getelementptr inbounds %class.A, %class.A* %this, i64 0, i32 0
+ %0 = load i32, i32* %_ref, align 4
%inc = add nsw i32 %0, 1
store i32 %inc, i32* %_ref, align 4
ret void
diff --git a/test/Transforms/JumpThreading/lvi-load.ll b/test/Transforms/JumpThreading/lvi-load.ll
index 2a4cf92..a36e263 100644
--- a/test/Transforms/JumpThreading/lvi-load.ll
+++ b/test/Transforms/JumpThreading/lvi-load.ll
@@ -16,8 +16,8 @@ target triple = "x86_64-apple-darwin10.4"
; CHECK: Z3fooPN4llvm5ValueE
define zeroext i8 @_Z3fooPN4llvm5ValueE(%"struct.llvm::Value"* %V) ssp {
entry:
- %0 = getelementptr inbounds %"struct.llvm::Value"* %V, i64 0, i32 1 ; <i8*> [#uses=1]
- %1 = load i8* %0, align 8 ; <i8> [#uses=2]
+ %0 = getelementptr inbounds %"struct.llvm::Value", %"struct.llvm::Value"* %V, i64 0, i32 1 ; <i8*> [#uses=1]
+ %1 = load i8, i8* %0, align 8 ; <i8> [#uses=2]
%2 = icmp ugt i8 %1, 20 ; <i1> [#uses=1]
br i1 %2, label %bb.i, label %bb2
@@ -27,7 +27,7 @@ bb.i: ; preds = %entry
; CHECK-NOT: assert
bb6.i.i: ; preds = %bb.i
- tail call void @__assert_rtn(i8* getelementptr inbounds ([5 x i8]* @_ZZN4llvm4castINS_11InstructionEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_E8__func__, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([59 x i8]* @.str1, i64 0, i64 0)) noreturn
+ tail call void @__assert_rtn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZZN4llvm4castINS_11InstructionEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_E8__func__, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str1, i64 0, i64 0)) noreturn
unreachable
_ZN4llvm8dyn_castINS_11InstructionEPNS_5ValueEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_.exit: ; preds = %bb.i
diff --git a/test/Transforms/JumpThreading/or-undef.ll b/test/Transforms/JumpThreading/or-undef.ll
index 6311b6d..b55bddd 100644
--- a/test/Transforms/JumpThreading/or-undef.ll
+++ b/test/Transforms/JumpThreading/or-undef.ll
@@ -32,13 +32,13 @@ bb2: ; preds = %bb1, %bb, %entry
br i1 %tmp7, label %bb7, label %bb5
bb5: ; preds = %bb2
- %tmp8 = load i8** %argv.0, align 8 ; <i8*> [#uses=1]
+ %tmp8 = load i8*, i8** %argv.0, align 8 ; <i8*> [#uses=1]
%tmp9 = icmp eq i8* %tmp8, null ; <i1> [#uses=1]
br i1 %tmp9, label %bb7, label %bb6
bb6: ; preds = %bb5
- %tmp10 = load i8** %argv.0, align 8 ; <i8*> [#uses=1]
- %tmp11 = load i8* %tmp10, align 1 ; <i8> [#uses=1]
+ %tmp10 = load i8*, i8** %argv.0, align 8 ; <i8*> [#uses=1]
+ %tmp11 = load i8, i8* %tmp10, align 1 ; <i8> [#uses=1]
%tmp12 = icmp eq i8 %tmp11, 0 ; <i1> [#uses=1]
br i1 %tmp12, label %bb7, label %bb8
@@ -47,7 +47,7 @@ bb7: ; preds = %bb6, %bb5, %bb2
br label %bb9
bb8: ; preds = %bb6
- %tmp13 = load i8** %argv.0, align 8 ; <i8*> [#uses=1]
+ %tmp13 = load i8*, i8** %argv.0, align 8 ; <i8*> [#uses=1]
%tmp14 = call i64 @f5(i8* %tmp13) nounwind ; <i64> [#uses=0]
br label %bb9
diff --git a/test/Transforms/JumpThreading/phi-eq.ll b/test/Transforms/JumpThreading/phi-eq.ll
index 3dd2c36..75e8cc8 100644
--- a/test/Transforms/JumpThreading/phi-eq.ll
+++ b/test/Transforms/JumpThreading/phi-eq.ll
@@ -39,7 +39,7 @@ if.then: ; preds = %do.body
br label %if.end
if.else: ; preds = %do.body
- call void @g_assertion_message_expr(i8* null, i8* getelementptr inbounds ([10 x i8]* @.str2, i32 0, i32 0), i32 581, i8* getelementptr inbounds ([62 x i8]* @__PRETTY_FUNCTION__.copy_filter_list, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8]* @.str12, i32 0, i32 0)) noreturn
+ call void @g_assertion_message_expr(i8* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str2, i32 0, i32 0), i32 581, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @__PRETTY_FUNCTION__.copy_filter_list, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str12, i32 0, i32 0)) noreturn
unreachable
if.end: ; preds = %if.then
@@ -66,7 +66,7 @@ sw.bb3.i: ; preds = %do.end
br label %get_filter_list.exit
sw.default.i: ; preds = %do.end
- call void @g_assertion_message(i8* null, i8* getelementptr inbounds ([10 x i8]* @.str2, i32 0, i32 0), i32 408, i8* getelementptr inbounds ([44 x i8]* @__PRETTY_FUNCTION__.get_filter_list, i32 0, i32 0), i8* null) noreturn nounwind
+ call void @g_assertion_message(i8* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str2, i32 0, i32 0), i32 408, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__PRETTY_FUNCTION__.get_filter_list, i32 0, i32 0), i8* null) noreturn nounwind
unreachable
get_filter_list.exit: ; preds = %sw.bb3.i, %sw.bb2.i, %sw.bb1.i, %sw.bb.i
@@ -91,40 +91,40 @@ sw.bb3.i4: ; preds = %get_filter_list.exi
br label %get_filter_list.exit6
sw.default.i5: ; preds = %get_filter_list.exit
- call void @g_assertion_message(i8* null, i8* getelementptr inbounds ([10 x i8]* @.str2, i32 0, i32 0), i32 408, i8* getelementptr inbounds ([44 x i8]* @__PRETTY_FUNCTION__.get_filter_list, i32 0, i32 0), i8* null) noreturn nounwind
+ call void @g_assertion_message(i8* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str2, i32 0, i32 0), i32 408, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__PRETTY_FUNCTION__.get_filter_list, i32 0, i32 0), i8* null) noreturn nounwind
unreachable
; CHECK: get_filter_list.exit
get_filter_list.exit6: ; preds = %sw.bb3.i4, %sw.bb2.i3, %sw.bb1.i2, %sw.bb.i1
%1 = phi %struct._GList** [ @display_edited_filters, %sw.bb3.i4 ], [ @capture_edited_filters, %sw.bb2.i3 ], [ @display_filters, %sw.bb1.i2 ], [ @capture_filters, %sw.bb.i1 ]
; CHECK: %2 = load
- %2 = load %struct._GList** %1, align 8
+ %2 = load %struct._GList*, %struct._GList** %1, align 8
; We should have jump-threading insert an additional load here for the value
; coming out of the first switch, which is picked up by a subsequent phi
-; CHECK: %.pr = load %struct._GList** %0
+; CHECK: %.pr = load %struct._GList*, %struct._GList** %0
; CHECK-NEXT: br label %while.cond
br label %while.cond
; CHECK: while.cond
while.cond: ; preds = %while.body, %get_filter_list.exit6
; CHECK: {{= phi .*%.pr}}
- %3 = load %struct._GList** %0, align 8
+ %3 = load %struct._GList*, %struct._GList** %0, align 8
; CHECK: tobool
%tobool = icmp ne %struct._GList* %3, null
br i1 %tobool, label %while.body, label %while.end
while.body: ; preds = %while.cond
- %4 = load %struct._GList** %0, align 8
- %5 = load %struct._GList** %0, align 8
+ %4 = load %struct._GList*, %struct._GList** %0, align 8
+ %5 = load %struct._GList*, %struct._GList** %0, align 8
%call2 = call %struct._GList* @g_list_first(%struct._GList* %5)
- %data.i = getelementptr inbounds %struct._GList* %call2, i32 0, i32 0
- %6 = load i8** %data.i, align 8
+ %data.i = getelementptr inbounds %struct._GList, %struct._GList* %call2, i32 0, i32 0
+ %6 = load i8*, i8** %data.i, align 8
%7 = bitcast i8* %6 to %struct.filter_def*
- %name.i = getelementptr inbounds %struct.filter_def* %7, i32 0, i32 0
- %8 = load i8** %name.i, align 8
+ %name.i = getelementptr inbounds %struct.filter_def, %struct.filter_def* %7, i32 0, i32 0
+ %8 = load i8*, i8** %name.i, align 8
call void @g_free(i8* %8) nounwind
- %strval.i = getelementptr inbounds %struct.filter_def* %7, i32 0, i32 1
- %9 = load i8** %strval.i, align 8
+ %strval.i = getelementptr inbounds %struct.filter_def, %struct.filter_def* %7, i32 0, i32 1
+ %9 = load i8*, i8** %strval.i, align 8
call void @g_free(i8* %9) nounwind
%10 = bitcast %struct.filter_def* %7 to i8*
call void @g_free(i8* %10) nounwind
@@ -136,7 +136,7 @@ while.end: ; preds = %while.cond
br label %do.body4
do.body4: ; preds = %while.end
- %11 = load %struct._GList** %0, align 8
+ %11 = load %struct._GList*, %struct._GList** %0, align 8
%call5 = call i32 @g_list_length(%struct._GList* %11)
%cmp6 = icmp eq i32 %call5, 0
br i1 %cmp6, label %if.then7, label %if.else8
@@ -145,7 +145,7 @@ if.then7: ; preds = %do.body4
br label %if.end9
if.else8: ; preds = %do.body4
- call void @g_assertion_message_expr(i8* null, i8* getelementptr inbounds ([10 x i8]* @.str2, i32 0, i32 0), i32 600, i8* getelementptr inbounds ([62 x i8]* @__PRETTY_FUNCTION__.copy_filter_list, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8]* @.str13, i32 0, i32 0)) noreturn
+ call void @g_assertion_message_expr(i8* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str2, i32 0, i32 0), i32 600, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @__PRETTY_FUNCTION__.copy_filter_list, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str13, i32 0, i32 0)) noreturn
unreachable
if.end9: ; preds = %if.then7
@@ -160,21 +160,21 @@ while.cond11: ; preds = %cond.end, %do.end10
br i1 %tobool12, label %while.body13, label %while.end16
while.body13: ; preds = %while.cond11
- %data = getelementptr inbounds %struct._GList* %cond10, i32 0, i32 0
- %12 = load i8** %data, align 8
+ %data = getelementptr inbounds %struct._GList, %struct._GList* %cond10, i32 0, i32 0
+ %12 = load i8*, i8** %data, align 8
%13 = bitcast i8* %12 to %struct.filter_def*
- %14 = load %struct._GList** %0, align 8
- %name = getelementptr inbounds %struct.filter_def* %13, i32 0, i32 0
- %15 = load i8** %name, align 8
- %strval = getelementptr inbounds %struct.filter_def* %13, i32 0, i32 1
- %16 = load i8** %strval, align 8
+ %14 = load %struct._GList*, %struct._GList** %0, align 8
+ %name = getelementptr inbounds %struct.filter_def, %struct.filter_def* %13, i32 0, i32 0
+ %15 = load i8*, i8** %name, align 8
+ %strval = getelementptr inbounds %struct.filter_def, %struct.filter_def* %13, i32 0, i32 1
+ %16 = load i8*, i8** %strval, align 8
%call.i7 = call noalias i8* @g_malloc(i64 16) nounwind
%17 = bitcast i8* %call.i7 to %struct.filter_def*
%call1.i = call noalias i8* @g_strdup(i8* %15) nounwind
- %name.i8 = getelementptr inbounds %struct.filter_def* %17, i32 0, i32 0
+ %name.i8 = getelementptr inbounds %struct.filter_def, %struct.filter_def* %17, i32 0, i32 0
store i8* %call1.i, i8** %name.i8, align 8
%call2.i = call noalias i8* @g_strdup(i8* %16) nounwind
- %strval.i9 = getelementptr inbounds %struct.filter_def* %17, i32 0, i32 1
+ %strval.i9 = getelementptr inbounds %struct.filter_def, %struct.filter_def* %17, i32 0, i32 1
store i8* %call2.i, i8** %strval.i9, align 8
%18 = bitcast %struct.filter_def* %17 to i8*
%call3.i = call %struct._GList* @g_list_append(%struct._GList* %14, i8* %18) nounwind
@@ -183,8 +183,8 @@ while.body13: ; preds = %while.cond11
br i1 %tobool15, label %cond.true, label %cond.false
cond.true: ; preds = %while.body13
- %next = getelementptr inbounds %struct._GList* %cond10, i32 0, i32 1
- %19 = load %struct._GList** %next, align 8
+ %next = getelementptr inbounds %struct._GList, %struct._GList* %cond10, i32 0, i32 1
+ %19 = load %struct._GList*, %struct._GList** %next, align 8
br label %cond.end
cond.false: ; preds = %while.body13
diff --git a/test/Transforms/JumpThreading/select.ll b/test/Transforms/JumpThreading/select.ll
index 545e86c..d0df772 100644
--- a/test/Transforms/JumpThreading/select.ll
+++ b/test/Transforms/JumpThreading/select.ll
@@ -135,7 +135,7 @@ L4:
; CHECK: icmp
define void @test_switch_default(i32* nocapture %status) nounwind {
entry:
- %0 = load i32* %status, align 4
+ %0 = load i32, i32* %status, align 4
switch i32 %0, label %L2 [
i32 5061, label %L1
i32 0, label %L2
@@ -146,7 +146,7 @@ L1:
br label %L2
L2:
- %1 = load i32* %status, align 4
+ %1 = load i32, i32* %status, align 4
%cmp57.i = icmp eq i32 %1, 0
br i1 %cmp57.i, label %L3, label %L4
diff --git a/test/Transforms/JumpThreading/thread-loads.ll b/test/Transforms/JumpThreading/thread-loads.ll
index 4351f99..008eac7 100644
--- a/test/Transforms/JumpThreading/thread-loads.ll
+++ b/test/Transforms/JumpThreading/thread-loads.ll
@@ -21,7 +21,7 @@ bb: ; preds = %entry
bb1: ; preds = %entry, %bb
%res.0 = phi i32 [ 1, %bb ], [ 0, %entry ] ; <i32> [#uses=2]
- %2 = load i32* %P, align 4 ; <i32> [#uses=1]
+ %2 = load i32, i32* %P, align 4 ; <i32> [#uses=1]
%3 = icmp sgt i32 %2, 36 ; <i1> [#uses=1]
br i1 %3, label %bb3, label %bb2
@@ -60,7 +60,7 @@ bb: ; preds = %entry
bb1: ; preds = %entry, %bb
%res.0 = phi i32 [ 1, %bb ], [ 0, %entry ]
- %2 = load i32* %P, align 4, !tbaa !0
+ %2 = load i32, i32* %P, align 4, !tbaa !0
%3 = icmp sgt i32 %2, 36
br i1 %3, label %bb3, label %bb2
@@ -83,16 +83,16 @@ define i32 @test3(i8** %x, i1 %f) {
; CHECK-LABEL: @test3(
entry:
%0 = bitcast i8** %x to i32**
- %1 = load i32** %0, align 8
+ %1 = load i32*, i32** %0, align 8
br i1 %f, label %if.end57, label %if.then56
-; CHECK: %[[LOAD:.*]] = load i32**
+; CHECK: %[[LOAD:.*]] = load i32*, i32**
; CHECK: %[[CAST:.*]] = bitcast i32* %[[LOAD]] to i8*
if.then56:
br label %if.end57
if.end57:
- %2 = load i8** %x, align 8
+ %2 = load i8*, i8** %x, align 8
%tobool59 = icmp eq i8* %2, null
br i1 %tobool59, label %return, label %if.then60
; CHECK: %[[PHI:.*]] = phi i8* [ %[[CAST]], %[[PRED:[^ ]+]] ], [ %[[CAST]], %[[PRED]] ]