aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG')
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll2
-rw-r--r--test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll2
-rw-r--r--test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll44
-rw-r--r--test/Transforms/SimplifyCFG/2006-08-03-Crash.ll46
-rw-r--r--test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll42
-rw-r--r--test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll2
-rw-r--r--test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll2
-rw-r--r--test/Transforms/SimplifyCFG/2009-05-12-externweak.ll2
-rw-r--r--test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll20
-rw-r--r--test/Transforms/SimplifyCFG/EmptyBlockMerge.ll2
-rw-r--r--test/Transforms/SimplifyCFG/MagicPointer.ll16
-rw-r--r--test/Transforms/SimplifyCFG/PR17073.ll6
-rw-r--r--test/Transforms/SimplifyCFG/SpeculativeExec.ll4
-rw-r--r--test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll4
-rw-r--r--test/Transforms/SimplifyCFG/X86/switch-table-bug.ll4
-rw-r--r--test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll44
-rw-r--r--test/Transforms/SimplifyCFG/attr-noduplicate.ll4
-rw-r--r--test/Transforms/SimplifyCFG/basictest.ll4
-rw-r--r--test/Transforms/SimplifyCFG/branch-fold-dbg.ll22
-rw-r--r--test/Transforms/SimplifyCFG/branch-fold-threshold.ll2
-rw-r--r--test/Transforms/SimplifyCFG/branch-phi-thread.ll2
-rw-r--r--test/Transforms/SimplifyCFG/dbginfo.ll2
-rw-r--r--test/Transforms/SimplifyCFG/duplicate-landingpad.ll110
-rw-r--r--test/Transforms/SimplifyCFG/hoist-common-code.ll4
-rw-r--r--test/Transforms/SimplifyCFG/hoist-dbgvalue.ll32
-rw-r--r--test/Transforms/SimplifyCFG/hoist-with-range.ll6
-rw-r--r--test/Transforms/SimplifyCFG/indirectbr.ll8
-rw-r--r--test/Transforms/SimplifyCFG/iterative-simplify.ll18
-rw-r--r--test/Transforms/SimplifyCFG/multiple-phis.ll4
-rw-r--r--test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll6
-rw-r--r--test/Transforms/SimplifyCFG/phi-undef-loadstore.ll10
-rw-r--r--test/Transforms/SimplifyCFG/preserve-branchweights.ll2
-rw-r--r--test/Transforms/SimplifyCFG/select-gep.ll2
-rw-r--r--test/Transforms/SimplifyCFG/speculate-store.ll40
-rw-r--r--test/Transforms/SimplifyCFG/speculate-with-offset.ll16
-rw-r--r--test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll4
-rw-r--r--test/Transforms/SimplifyCFG/switch_create.ll4
-rw-r--r--test/Transforms/SimplifyCFG/trap-debugloc.ll14
-rw-r--r--test/Transforms/SimplifyCFG/trapping-load-unreachable.ll2
-rw-r--r--test/Transforms/SimplifyCFG/unreachable-blocks.ll4
-rw-r--r--test/Transforms/SimplifyCFG/volatile-phioper.ll2
43 files changed, 342 insertions, 232 deletions
diff --git a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
index fbfb100..0626ea1 100644
--- a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
+++ b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
@@ -9,7 +9,7 @@
@.str = internal constant [4 x i8] c"a.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1]
@.str1 = internal constant [6 x i8] c"/tmp/\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1]
@.str2 = internal constant [55 x i8] c"4.2.1 (Based on Apple Inc. build 5636) (LLVM build 00)\00", section "llvm.metadata" ; <[55 x i8]*> [#uses=1]
-@llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1]
+@llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8], [55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1]
declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind
diff --git a/test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll b/test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll
index 90be680..8fd1fae 100644
--- a/test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll
+++ b/test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll
@@ -30,7 +30,7 @@ endif.0: ; preds = %loopentry.0
%tmp.14 = sext i8 %tmp.1 to i32 ; <i32> [#uses=1]
%tmp.16 = zext i8 %l_88173906 to i32 ; <i32> [#uses=1]
%tmp.17 = icmp sgt i32 %tmp.14, %tmp.16 ; <i1> [#uses=1]
- %tmp.19 = load i32* @g_59182229 ; <i32> [#uses=2]
+ %tmp.19 = load i32, i32* @g_59182229 ; <i32> [#uses=2]
br i1 %tmp.17, label %cond_true, label %cond_false
cond_true: ; preds = %endif.0
%tmp.20 = icmp ne i32 %tmp.19, 1 ; <i1> [#uses=1]
@@ -53,7 +53,7 @@ loopentry.1: ; preds = %endif.3, %else.2
%tmp.29 = icmp sgt i32 %i.1.1, 99 ; <i1> [#uses=1]
br i1 %tmp.29, label %endif.2, label %no_exit.1
no_exit.1: ; preds = %loopentry.1
- %tmp.30 = load i32* @g_38098584 ; <i32> [#uses=1]
+ %tmp.30 = load i32, i32* @g_38098584 ; <i32> [#uses=1]
%tmp.31 = icmp eq i32 %tmp.30, 0 ; <i1> [#uses=1]
br i1 %tmp.31, label %else.3, label %then.3
then.3: ; preds = %no_exit.1
diff --git a/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll b/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
index c30bfa1..c459867 100644
--- a/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
+++ b/test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll
@@ -58,7 +58,7 @@ then.2.i: ; preds = %endif.1.i, %then.1.i
getfree.exit: ; preds = %endif.1.i, %then.1.i
ret void
endif.1: ; preds = %read_min.exit
- %tmp.27.i = getelementptr i32* null, i32 0 ; <i32*> [#uses=0]
+ %tmp.27.i = getelementptr i32, i32* null, i32 0 ; <i32*> [#uses=0]
br i1 false, label %loopexit.0.i15, label %no_exit.0.i14
no_exit.0.i14: ; preds = %endif.1
ret void
diff --git a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
index 907261b..2606e08 100644
--- a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
+++ b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
@@ -36,8 +36,8 @@ entry:
%guess = alloca %struct.anon* ; <%struct.anon**> [#uses=7]
%guess1 = alloca %struct.anon* ; <%struct.anon**> [#uses=7]
%point5 = alloca %struct.anon* ; <%struct.anon**> [#uses=3]
- %tmp = load %struct.anon** %num ; <%struct.anon*> [#uses=1]
- %tmp1 = load %struct.anon** @_zero_ ; <%struct.anon*> [#uses=1]
+ %tmp = load %struct.anon*, %struct.anon** %num ; <%struct.anon*> [#uses=1]
+ %tmp1 = load %struct.anon*, %struct.anon** @_zero_ ; <%struct.anon*> [#uses=1]
%tmp.upgrd.1 = call i32 @bc_compare( %struct.anon* %tmp, %struct.anon* %tmp1 ) ; <i32> [#uses=2]
%tmp.upgrd.2 = icmp slt i32 %tmp.upgrd.1, 0 ; <i1> [#uses=1]
br i1 %tmp.upgrd.2, label %cond_true, label %cond_false
@@ -48,26 +48,26 @@ cond_false: ; preds = %entry
br i1 %tmp5, label %cond_true6, label %cond_next13
cond_true6: ; preds = %cond_false
call void @free_num( %struct.anon** %num )
- %tmp8 = load %struct.anon** @_zero_ ; <%struct.anon*> [#uses=1]
+ %tmp8 = load %struct.anon*, %struct.anon** @_zero_ ; <%struct.anon*> [#uses=1]
%tmp9 = call %struct.anon* @copy_num( %struct.anon* %tmp8 ) ; <%struct.anon*> [#uses=1]
store %struct.anon* %tmp9, %struct.anon** %num
ret i32 1
cond_next13: ; preds = %cond_false
- %tmp15 = load %struct.anon** %num ; <%struct.anon*> [#uses=1]
- %tmp16 = load %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
+ %tmp15 = load %struct.anon*, %struct.anon** %num ; <%struct.anon*> [#uses=1]
+ %tmp16 = load %struct.anon*, %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
%tmp17 = call i32 @bc_compare( %struct.anon* %tmp15, %struct.anon* %tmp16 ) ; <i32> [#uses=2]
%tmp19 = icmp eq i32 %tmp17, 0 ; <i1> [#uses=1]
br i1 %tmp19, label %cond_true20, label %cond_next27
cond_true20: ; preds = %cond_next13
call void @free_num( %struct.anon** %num )
- %tmp22 = load %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
+ %tmp22 = load %struct.anon*, %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
%tmp23 = call %struct.anon* @copy_num( %struct.anon* %tmp22 ) ; <%struct.anon*> [#uses=1]
store %struct.anon* %tmp23, %struct.anon** %num
ret i32 1
cond_next27: ; preds = %cond_next13
- %tmp29 = load %struct.anon** %num ; <%struct.anon*> [#uses=1]
- %tmp30 = getelementptr %struct.anon* %tmp29, i32 0, i32 2 ; <i32*> [#uses=1]
- %tmp31 = load i32* %tmp30 ; <i32> [#uses=2]
+ %tmp29 = load %struct.anon*, %struct.anon** %num ; <%struct.anon*> [#uses=1]
+ %tmp30 = getelementptr %struct.anon, %struct.anon* %tmp29, i32 0, i32 2 ; <i32*> [#uses=1]
+ %tmp31 = load i32, i32* %tmp30 ; <i32> [#uses=2]
%tmp33 = icmp sge i32 %tmp31, %scale ; <i1> [#uses=1]
%max = select i1 %tmp33, i32 %tmp31, i32 %scale ; <i32> [#uses=4]
%tmp35 = add i32 %max, 2 ; <i32> [#uses=0]
@@ -75,29 +75,29 @@ cond_next27: ; preds = %cond_next13
call void @init_num( %struct.anon** %guess1 )
%tmp36 = call %struct.anon* @new_num( i32 1, i32 1 ) ; <%struct.anon*> [#uses=2]
store %struct.anon* %tmp36, %struct.anon** %point5
- %tmp.upgrd.3 = getelementptr %struct.anon* %tmp36, i32 0, i32 4, i32 1 ; <i8*> [#uses=1]
+ %tmp.upgrd.3 = getelementptr %struct.anon, %struct.anon* %tmp36, i32 0, i32 4, i32 1 ; <i8*> [#uses=1]
store i8 5, i8* %tmp.upgrd.3
%tmp39 = icmp slt i32 %tmp17, 0 ; <i1> [#uses=1]
br i1 %tmp39, label %cond_true40, label %cond_false43
cond_true40: ; preds = %cond_next27
- %tmp41 = load %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
+ %tmp41 = load %struct.anon*, %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
%tmp42 = call %struct.anon* @copy_num( %struct.anon* %tmp41 ) ; <%struct.anon*> [#uses=1]
store %struct.anon* %tmp42, %struct.anon** %guess
br label %bb80.outer
cond_false43: ; preds = %cond_next27
call void @int2num( %struct.anon** %guess, i32 10 )
- %tmp45 = load %struct.anon** %num ; <%struct.anon*> [#uses=1]
- %tmp46 = getelementptr %struct.anon* %tmp45, i32 0, i32 1 ; <i32*> [#uses=1]
- %tmp47 = load i32* %tmp46 ; <i32> [#uses=1]
+ %tmp45 = load %struct.anon*, %struct.anon** %num ; <%struct.anon*> [#uses=1]
+ %tmp46 = getelementptr %struct.anon, %struct.anon* %tmp45, i32 0, i32 1 ; <i32*> [#uses=1]
+ %tmp47 = load i32, i32* %tmp46 ; <i32> [#uses=1]
call void @int2num( %struct.anon** %guess1, i32 %tmp47 )
- %tmp48 = load %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
- %tmp49 = load %struct.anon** %point5 ; <%struct.anon*> [#uses=1]
+ %tmp48 = load %struct.anon*, %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
+ %tmp49 = load %struct.anon*, %struct.anon** %point5 ; <%struct.anon*> [#uses=1]
call void @bc_multiply( %struct.anon* %tmp48, %struct.anon* %tmp49, %struct.anon** %guess1, i32 %max )
- %tmp51 = load %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
- %tmp52 = getelementptr %struct.anon* %tmp51, i32 0, i32 2 ; <i32*> [#uses=1]
+ %tmp51 = load %struct.anon*, %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
+ %tmp52 = getelementptr %struct.anon, %struct.anon* %tmp51, i32 0, i32 2 ; <i32*> [#uses=1]
store i32 0, i32* %tmp52
- %tmp53 = load %struct.anon** %guess ; <%struct.anon*> [#uses=1]
- %tmp54 = load %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
+ %tmp53 = load %struct.anon*, %struct.anon** %guess ; <%struct.anon*> [#uses=1]
+ %tmp54 = load %struct.anon*, %struct.anon** %guess1 ; <%struct.anon*> [#uses=1]
call void @bc_raise( %struct.anon* %tmp53, %struct.anon* %tmp54, %struct.anon** %guess, i32 %max )
br label %bb80.outer
bb80.outer: ; preds = %cond_true83, %cond_false43, %cond_true40
@@ -113,8 +113,8 @@ cond_true83: ; preds = %bb80
; CHECK: bb86
bb86: ; preds = %bb80
call void @free_num( %struct.anon** %num )
- %tmp88 = load %struct.anon** %guess ; <%struct.anon*> [#uses=1]
- %tmp89 = load %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
+ %tmp88 = load %struct.anon*, %struct.anon** %guess ; <%struct.anon*> [#uses=1]
+ %tmp89 = load %struct.anon*, %struct.anon** @_one_ ; <%struct.anon*> [#uses=1]
%tmp92 = call i32 @bc_divide( %struct.anon* %tmp88, %struct.anon* %tmp89, %struct.anon** %num, i32 %max ) ; <i32> [#uses=0]
call void @free_num( %struct.anon** %guess )
call void @free_num( %struct.anon** %guess1 )
diff --git a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
index 70fbddf..0820e9c 100644
--- a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
+++ b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
@@ -34,7 +34,7 @@ target triple = "powerpc-apple-darwin8"
define void @fold_builtin_classify() {
entry:
- %tmp63 = load i32* null ; <i32> [#uses=1]
+ %tmp63 = load i32, i32* null ; <i32> [#uses=1]
switch i32 %tmp63, label %bb276 [
i32 414, label %bb145
i32 417, label %bb
@@ -42,54 +42,54 @@ entry:
bb: ; preds = %entry
ret void
bb145: ; preds = %entry
- %tmp146 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
- %tmp148 = getelementptr %struct.tree_node* %tmp146, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
- %tmp149 = load %struct.tree_node** %tmp148 ; <%struct.tree_node*> [#uses=1]
+ %tmp146 = load %struct.tree_node*, %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
+ %tmp148 = getelementptr %struct.tree_node, %struct.tree_node* %tmp146, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
+ %tmp149 = load %struct.tree_node*, %struct.tree_node** %tmp148 ; <%struct.tree_node*> [#uses=1]
%tmp150 = bitcast %struct.tree_node* %tmp149 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1]
- %tmp151 = getelementptr %struct.tree_type* %tmp150, i32 0, i32 6 ; <i16*> [#uses=1]
+ %tmp151 = getelementptr %struct.tree_type, %struct.tree_type* %tmp150, i32 0, i32 6 ; <i16*> [#uses=1]
%tmp151.upgrd.1 = bitcast i16* %tmp151 to i32* ; <i32*> [#uses=1]
- %tmp152 = load i32* %tmp151.upgrd.1 ; <i32> [#uses=1]
+ %tmp152 = load i32, i32* %tmp151.upgrd.1 ; <i32> [#uses=1]
%tmp154 = lshr i32 %tmp152, 16 ; <i32> [#uses=1]
%tmp154.mask = and i32 %tmp154, 127 ; <i32> [#uses=1]
%gep.upgrd.2 = zext i32 %tmp154.mask to i64 ; <i64> [#uses=1]
- %tmp155 = getelementptr [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.2 ; <i8*> [#uses=1]
- %tmp156 = load i8* %tmp155 ; <i8> [#uses=1]
+ %tmp155 = getelementptr [35 x i8], [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.2 ; <i8*> [#uses=1]
+ %tmp156 = load i8, i8* %tmp155 ; <i8> [#uses=1]
%tmp157 = icmp eq i8 %tmp156, 4 ; <i1> [#uses=1]
br i1 %tmp157, label %cond_next241, label %cond_true158
cond_true158: ; preds = %bb145
- %tmp172 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
- %tmp174 = getelementptr %struct.tree_node* %tmp172, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
- %tmp175 = load %struct.tree_node** %tmp174 ; <%struct.tree_node*> [#uses=1]
+ %tmp172 = load %struct.tree_node*, %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
+ %tmp174 = getelementptr %struct.tree_node, %struct.tree_node* %tmp172, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
+ %tmp175 = load %struct.tree_node*, %struct.tree_node** %tmp174 ; <%struct.tree_node*> [#uses=1]
%tmp176 = bitcast %struct.tree_node* %tmp175 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1]
- %tmp177 = getelementptr %struct.tree_type* %tmp176, i32 0, i32 6 ; <i16*> [#uses=1]
+ %tmp177 = getelementptr %struct.tree_type, %struct.tree_type* %tmp176, i32 0, i32 6 ; <i16*> [#uses=1]
%tmp177.upgrd.3 = bitcast i16* %tmp177 to i32* ; <i32*> [#uses=1]
- %tmp178 = load i32* %tmp177.upgrd.3 ; <i32> [#uses=1]
+ %tmp178 = load i32, i32* %tmp177.upgrd.3 ; <i32> [#uses=1]
%tmp180 = lshr i32 %tmp178, 16 ; <i32> [#uses=1]
%tmp180.mask = and i32 %tmp180, 127 ; <i32> [#uses=1]
%gep.upgrd.4 = zext i32 %tmp180.mask to i64 ; <i64> [#uses=1]
- %tmp181 = getelementptr [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.4 ; <i8*> [#uses=1]
- %tmp182 = load i8* %tmp181 ; <i8> [#uses=1]
+ %tmp181 = getelementptr [35 x i8], [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.4 ; <i8*> [#uses=1]
+ %tmp182 = load i8, i8* %tmp181 ; <i8> [#uses=1]
%tmp183 = icmp eq i8 %tmp182, 8 ; <i1> [#uses=1]
br i1 %tmp183, label %cond_next241, label %cond_true184
cond_true184: ; preds = %cond_true158
- %tmp185 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
- %tmp187 = getelementptr %struct.tree_node* %tmp185, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
- %tmp188 = load %struct.tree_node** %tmp187 ; <%struct.tree_node*> [#uses=1]
+ %tmp185 = load %struct.tree_node*, %struct.tree_node** null ; <%struct.tree_node*> [#uses=1]
+ %tmp187 = getelementptr %struct.tree_node, %struct.tree_node* %tmp185, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1]
+ %tmp188 = load %struct.tree_node*, %struct.tree_node** %tmp187 ; <%struct.tree_node*> [#uses=1]
%tmp189 = bitcast %struct.tree_node* %tmp188 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1]
- %tmp190 = getelementptr %struct.tree_type* %tmp189, i32 0, i32 6 ; <i16*> [#uses=1]
+ %tmp190 = getelementptr %struct.tree_type, %struct.tree_type* %tmp189, i32 0, i32 6 ; <i16*> [#uses=1]
%tmp190.upgrd.5 = bitcast i16* %tmp190 to i32* ; <i32*> [#uses=1]
- %tmp191 = load i32* %tmp190.upgrd.5 ; <i32> [#uses=1]
+ %tmp191 = load i32, i32* %tmp190.upgrd.5 ; <i32> [#uses=1]
%tmp193 = lshr i32 %tmp191, 16 ; <i32> [#uses=1]
%tmp193.mask = and i32 %tmp193, 127 ; <i32> [#uses=1]
%gep.upgrd.6 = zext i32 %tmp193.mask to i64 ; <i64> [#uses=1]
- %tmp194 = getelementptr [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.6 ; <i8*> [#uses=1]
- %tmp195 = load i8* %tmp194 ; <i8> [#uses=1]
+ %tmp194 = getelementptr [35 x i8], [35 x i8]* @mode_class, i32 0, i64 %gep.upgrd.6 ; <i8*> [#uses=1]
+ %tmp195 = load i8, i8* %tmp194 ; <i8> [#uses=1]
%tmp196 = icmp eq i8 %tmp195, 4 ; <i1> [#uses=1]
br i1 %tmp196, label %cond_next241, label %cond_true197
cond_true197: ; preds = %cond_true184
ret void
cond_next241: ; preds = %cond_true184, %cond_true158, %bb145
- %tmp245 = load i32* null ; <i32> [#uses=0]
+ %tmp245 = load i32, i32* null ; <i32> [#uses=0]
ret void
bb276: ; preds = %entry
ret void
diff --git a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
index af865ce..dcf2412 100644
--- a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
+++ b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
@@ -45,42 +45,42 @@ entry:
store %struct.trie_s* %t, %struct.trie_s** %t_addr
store %struct.FILE* %f, %struct.FILE** %f_addr
store i32 0, i32* %wstate
- %tmp = getelementptr %struct.charsequence* %cs, i64 0, i32 0 ; <i8**> [#uses=1]
- %tmp1 = getelementptr %struct.charsequence* @C.0.2294, i64 0, i32 0 ; <i8**> [#uses=1]
- %tmp.upgrd.5 = load i8** %tmp1 ; <i8*> [#uses=1]
+ %tmp = getelementptr %struct.charsequence, %struct.charsequence* %cs, i64 0, i32 0 ; <i8**> [#uses=1]
+ %tmp1 = getelementptr %struct.charsequence, %struct.charsequence* @C.0.2294, i64 0, i32 0 ; <i8**> [#uses=1]
+ %tmp.upgrd.5 = load i8*, i8** %tmp1 ; <i8*> [#uses=1]
store i8* %tmp.upgrd.5, i8** %tmp
- %tmp.upgrd.6 = getelementptr %struct.charsequence* %cs, i64 0, i32 1 ; <i32*> [#uses=1]
- %tmp2 = getelementptr %struct.charsequence* @C.0.2294, i64 0, i32 1 ; <i32*> [#uses=1]
- %tmp.upgrd.7 = load i32* %tmp2 ; <i32> [#uses=1]
+ %tmp.upgrd.6 = getelementptr %struct.charsequence, %struct.charsequence* %cs, i64 0, i32 1 ; <i32*> [#uses=1]
+ %tmp2 = getelementptr %struct.charsequence, %struct.charsequence* @C.0.2294, i64 0, i32 1 ; <i32*> [#uses=1]
+ %tmp.upgrd.7 = load i32, i32* %tmp2 ; <i32> [#uses=1]
store i32 %tmp.upgrd.7, i32* %tmp.upgrd.6
- %tmp3 = getelementptr %struct.charsequence* %cs, i64 0, i32 2 ; <i32*> [#uses=1]
- %tmp4 = getelementptr %struct.charsequence* @C.0.2294, i64 0, i32 2 ; <i32*> [#uses=1]
- %tmp5 = load i32* %tmp4 ; <i32> [#uses=1]
+ %tmp3 = getelementptr %struct.charsequence, %struct.charsequence* %cs, i64 0, i32 2 ; <i32*> [#uses=1]
+ %tmp4 = getelementptr %struct.charsequence, %struct.charsequence* @C.0.2294, i64 0, i32 2 ; <i32*> [#uses=1]
+ %tmp5 = load i32, i32* %tmp4 ; <i32> [#uses=1]
store i32 %tmp5, i32* %tmp3
br label %bb33
bb: ; preds = %bb33
- %tmp.upgrd.8 = load %struct.FILE** %f_addr ; <%struct.FILE*> [#uses=1]
+ %tmp.upgrd.8 = load %struct.FILE*, %struct.FILE** %f_addr ; <%struct.FILE*> [#uses=1]
%tmp.upgrd.9 = call i32 @_IO_getc( %struct.FILE* %tmp.upgrd.8 ) ; <i32> [#uses=1]
%tmp6 = call i32 @tolower( i32 %tmp.upgrd.9 ) ; <i32> [#uses=1]
%tmp6.upgrd.10 = trunc i32 %tmp6 to i8 ; <i8> [#uses=1]
store i8 %tmp6.upgrd.10, i8* %c
- %tmp7 = load i32* %wstate ; <i32> [#uses=1]
+ %tmp7 = load i32, i32* %wstate ; <i32> [#uses=1]
%tmp.upgrd.11 = icmp ne i32 %tmp7, 0 ; <i1> [#uses=1]
br i1 %tmp.upgrd.11, label %cond_true, label %cond_false
cond_true: ; preds = %bb
- %tmp.upgrd.12 = load i8* %c ; <i8> [#uses=1]
+ %tmp.upgrd.12 = load i8, i8* %c ; <i8> [#uses=1]
%tmp8 = icmp sle i8 %tmp.upgrd.12, 96 ; <i1> [#uses=1]
br i1 %tmp8, label %cond_true9, label %cond_next
cond_true9: ; preds = %cond_true
br label %bb16
cond_next: ; preds = %cond_true
- %tmp10 = load i8* %c ; <i8> [#uses=1]
+ %tmp10 = load i8, i8* %c ; <i8> [#uses=1]
%tmp11 = icmp sgt i8 %tmp10, 122 ; <i1> [#uses=1]
br i1 %tmp11, label %cond_true12, label %cond_next13
cond_true12: ; preds = %cond_next
br label %bb16
cond_next13: ; preds = %cond_next
- %tmp14 = load i8* %c ; <i8> [#uses=1]
+ %tmp14 = load i8, i8* %c ; <i8> [#uses=1]
%tmp14.upgrd.13 = sext i8 %tmp14 to i32 ; <i32> [#uses=1]
%tmp1415 = trunc i32 %tmp14.upgrd.13 to i8 ; <i8> [#uses=1]
call void @charsequence_push( %struct.charsequence* %cs, i8 %tmp1415 )
@@ -88,26 +88,26 @@ cond_next13: ; preds = %cond_next
bb16: ; preds = %cond_true12, %cond_true9
%tmp17 = call i8* @charsequence_val( %struct.charsequence* %cs ) ; <i8*> [#uses=1]
store i8* %tmp17, i8** %str
- %tmp.upgrd.14 = load %struct.trie_s** %t_addr ; <%struct.trie_s*> [#uses=1]
- %tmp18 = load i8** %str ; <i8*> [#uses=1]
+ %tmp.upgrd.14 = load %struct.trie_s*, %struct.trie_s** %t_addr ; <%struct.trie_s*> [#uses=1]
+ %tmp18 = load i8*, i8** %str ; <i8*> [#uses=1]
%tmp19 = call %struct.trie_s* @trie_insert( %struct.trie_s* %tmp.upgrd.14, i8* %tmp18 ) ; <%struct.trie_s*> [#uses=0]
- %tmp20 = load i8** %str ; <i8*> [#uses=1]
+ %tmp20 = load i8*, i8** %str ; <i8*> [#uses=1]
call void @free( i8* %tmp20 )
store i32 0, i32* %wstate
br label %bb21
bb21: ; preds = %bb16, %cond_next13
br label %cond_next32
cond_false: ; preds = %bb
- %tmp22 = load i8* %c ; <i8> [#uses=1]
+ %tmp22 = load i8, i8* %c ; <i8> [#uses=1]
%tmp23 = icmp sgt i8 %tmp22, 96 ; <i1> [#uses=1]
br i1 %tmp23, label %cond_true24, label %cond_next31
cond_true24: ; preds = %cond_false
- %tmp25 = load i8* %c ; <i8> [#uses=1]
+ %tmp25 = load i8, i8* %c ; <i8> [#uses=1]
%tmp26 = icmp sle i8 %tmp25, 122 ; <i1> [#uses=1]
br i1 %tmp26, label %cond_true27, label %cond_next30
cond_true27: ; preds = %cond_true24
call void @charsequence_reset( %struct.charsequence* %cs )
- %tmp28 = load i8* %c ; <i8> [#uses=1]
+ %tmp28 = load i8, i8* %c ; <i8> [#uses=1]
%tmp28.upgrd.15 = sext i8 %tmp28 to i32 ; <i32> [#uses=1]
%tmp2829 = trunc i32 %tmp28.upgrd.15 to i8 ; <i8> [#uses=1]
call void @charsequence_push( %struct.charsequence* %cs, i8 %tmp2829 )
@@ -120,7 +120,7 @@ cond_next31: ; preds = %cond_next30, %cond_false
cond_next32: ; preds = %cond_next31, %bb21
br label %bb33
bb33: ; preds = %cond_next32, %entry
- %tmp34 = load %struct.FILE** %f_addr ; <%struct.FILE*> [#uses=1]
+ %tmp34 = load %struct.FILE*, %struct.FILE** %f_addr ; <%struct.FILE*> [#uses=1]
%tmp35 = call i32 @feof( %struct.FILE* %tmp34 ) ; <i32> [#uses=1]
%tmp36 = icmp eq i32 %tmp35, 0 ; <i1> [#uses=1]
br i1 %tmp36, label %bb, label %bb37
diff --git a/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll b/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
index 8e15637..7625d93 100644
--- a/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
+++ b/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
@@ -8,7 +8,7 @@ target triple = "i686-apple-darwin8"
define void @test(i32 %X, i32 %Y, i32 %Z) {
entry:
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp = load i32* @G, align 8 ; <i32> [#uses=2]
+ %tmp = load i32, i32* @G, align 8 ; <i32> [#uses=2]
%tmp3 = icmp eq i32 %X, %Y ; <i1> [#uses=1]
%tmp34 = zext i1 %tmp3 to i8 ; <i8> [#uses=1]
%toBool = icmp ne i8 %tmp34, 0 ; <i1> [#uses=1]
diff --git a/test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll b/test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll
index 9b6084f..2ef49bf 100644
--- a/test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll
+++ b/test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll
@@ -9,7 +9,7 @@ target triple = "i386-pc-linux-gnu"
define i32 @main() nounwind {
entry:
- %l = load i32* @g_37, align 4 ; <i32> [#uses=1]
+ %l = load i32, i32* @g_37, align 4 ; <i32> [#uses=1]
%cmpa = icmp ne i32 %l, 0 ; <i1> [#uses=3]
br i1 %cmpa, label %func_1.exit, label %mooseblock
@@ -29,7 +29,7 @@ cowblock: ; preds = %beeblock, %monkeyblock
func_1.exit: ; preds = %cowblock, %entry
%outval = phi i32 [ %cowval, %cowblock ], [ 1, %entry ] ; <i32> [#uses=1]
- %pout = tail call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([4 x i8]* @.str, i32 0, i32 0), i32 %outval ) nounwind ; <i32> [#uses=0]
+ %pout = tail call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %outval ) nounwind ; <i32> [#uses=0]
ret i32 0
}
diff --git a/test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll b/test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll
index ac9622d..6b216f5 100644
--- a/test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll
+++ b/test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll
@@ -4,7 +4,7 @@
define i32 @func_127(i32 %p_129) nounwind {
entry:
- load i32* @g_103, align 4 ; <i32>:0 [#uses=1]
+ load i32, i32* @g_103, align 4 ; <i32>:0 [#uses=1]
icmp eq i32 %0, 0 ; <i1>:1 [#uses=2]
br i1 %1, label %bb6.preheader, label %entry.return_crit_edge
diff --git a/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll b/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll
index 419feb6..faf3f5f 100644
--- a/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll
+++ b/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll
@@ -18,7 +18,7 @@ bb: ; preds = %bb4
br i1 icmp ne (i32* @i, i32* null), label %bb1, label %bb2
bb1: ; preds = %bb
- %0 = load i32* @i, align 4 ; <i32> [#uses=1]
+ %0 = load i32, i32* @i, align 4 ; <i32> [#uses=1]
br label %bb3
bb2: ; preds = %bb
diff --git a/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll b/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
index 076cb58..cfbe219 100644
--- a/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
+++ b/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
@@ -5,9 +5,9 @@
; Function Attrs: nounwind
define double @_Z3fooRdS_S_S_(double* dereferenceable(8) %x, double* dereferenceable(8) %y, double* dereferenceable(8) %a) #0 {
entry:
- %0 = load double* %y, align 8
+ %0 = load double, double* %y, align 8
%cmp = fcmp oeq double %0, 0.000000e+00
- %1 = load double* %x, align 8
+ %1 = load double, double* %x, align 8
br i1 %cmp, label %if.then, label %if.else
; fadd (const, (fmul x, y))
@@ -15,7 +15,7 @@ if.then: ; preds = %entry
; CHECK-LABEL: if.then:
; CHECK: %3 = fmul fast double %1, %2
; CHECK-NEXT: %mul = fadd fast double 1.000000e+00, %3
- %2 = load double* %a, align 8
+ %2 = load double, double* %a, align 8
%3 = fmul fast double %1, %2
%mul = fadd fast double 1.000000e+00, %3
store double %mul, double* %y, align 8
@@ -26,16 +26,16 @@ if.else: ; preds = %entry
; CHECK-LABEL: if.else:
; CHECK: %mul1 = fmul fast double %1, %2
; CHECK-NEXT: %sub1 = fsub fast double %mul1, %0
- %4 = load double* %a, align 8
+ %4 = load double, double* %a, align 8
%mul1 = fmul fast double %1, %4
%sub1 = fsub fast double %mul1, %0
store double %sub1, double* %y, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
- %5 = load double* %y, align 8
+ %5 = load double, double* %y, align 8
%cmp2 = fcmp oeq double %5, 2.000000e+00
- %6 = load double* %x, align 8
+ %6 = load double, double* %x, align 8
br i1 %cmp2, label %if.then2, label %if.else2
; fsub (x, (fmul y, z))
@@ -43,7 +43,7 @@ if.then2: ; preds = %entry
; CHECK-LABEL: if.then2:
; CHECK: %7 = fmul fast double %5, 3.000000e+00
; CHECK-NEXT: %mul2 = fsub fast double %6, %7
- %7 = load double* %a, align 8
+ %7 = load double, double* %a, align 8
%8 = fmul fast double %6, 3.0000000e+00
%mul2 = fsub fast double %7, %8
store double %mul2, double* %y, align 8
@@ -62,10 +62,10 @@ if.else2: ; preds = %entry
br label %if.end2
if.end2: ; preds = %if.else, %if.then
- %9 = load double* %x, align 8
- %10 = load double* %y, align 8
+ %9 = load double, double* %x, align 8
+ %10 = load double, double* %y, align 8
%add = fadd fast double %9, %10
- %11 = load double* %a, align 8
+ %11 = load double, double* %a, align 8
%add2 = fadd fast double %add, %11
ret double %add2
}
diff --git a/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll b/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
index aba08dc..32a0202 100644
--- a/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
+++ b/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
@@ -6,7 +6,7 @@ declare void @foo()
define void @cprop_test12(i32* %data) {
bb0:
- %reg108 = load i32* %data ; <i32> [#uses=2]
+ %reg108 = load i32, i32* %data ; <i32> [#uses=2]
%cond218 = icmp ne i32 %reg108, 5 ; <i1> [#uses=1]
br i1 %cond218, label %bb3, label %bb2
bb2: ; preds = %bb0
diff --git a/test/Transforms/SimplifyCFG/MagicPointer.ll b/test/Transforms/SimplifyCFG/MagicPointer.ll
index b8b8cbd..7789600 100644
--- a/test/Transforms/SimplifyCFG/MagicPointer.ll
+++ b/test/Transforms/SimplifyCFG/MagicPointer.ll
@@ -33,7 +33,7 @@ entry:
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
- %call = call i32 @puts(i8* getelementptr inbounds ([5 x i8]* @.str, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end21
if.else: ; preds = %entry
@@ -41,7 +41,7 @@ if.else: ; preds = %entry
br i1 %cmp, label %if.then2, label %if.else4
if.then2: ; preds = %if.else
- %call3 = call i32 @puts(i8* getelementptr inbounds ([4 x i8]* @.str1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call3 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end20
if.else4: ; preds = %if.else
@@ -53,7 +53,7 @@ lor.lhs.false: ; preds = %if.else4
br i1 %cmp8, label %if.then9, label %if.else11
if.then9: ; preds = %lor.lhs.false, %if.else4
- %call10 = call i32 @puts(i8* getelementptr inbounds ([4 x i8]* @.str2, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call10 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str2, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end19
if.else11: ; preds = %lor.lhs.false
@@ -61,7 +61,7 @@ if.else11: ; preds = %lor.lhs.false
br i1 %cmp13, label %if.then14, label %if.else16
if.then14: ; preds = %if.else11
- %call15 = call i32 @puts(i8* getelementptr inbounds ([5 x i8]* @.str3, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call15 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str3, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end
if.else16: ; preds = %if.else11
@@ -99,7 +99,7 @@ entry:
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
- %call = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([5 x i8] addrspace(1)* @.str_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(1)* @.str_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end21
if.else: ; preds = %entry
@@ -107,7 +107,7 @@ if.else: ; preds = %entry
br i1 %cmp, label %if.then2, label %if.else4
if.then2: ; preds = %if.else
- %call3 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([4 x i8] addrspace(1)* @.str1_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call3 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(1)* @.str1_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end20
if.else4: ; preds = %if.else
@@ -119,7 +119,7 @@ lor.lhs.false: ; preds = %if.else4
br i1 %cmp8, label %if.then9, label %if.else11
if.then9: ; preds = %lor.lhs.false, %if.else4
- %call10 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([4 x i8] addrspace(1)* @.str2_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call10 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(1)* @.str2_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end19
if.else11: ; preds = %lor.lhs.false
@@ -127,7 +127,7 @@ if.else11: ; preds = %lor.lhs.false
br i1 %cmp13, label %if.then14, label %if.else16
if.then14: ; preds = %if.else11
- %call15 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([5 x i8] addrspace(1)* @.str3_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
+ %call15 = call i32 @puts_as1(i8 addrspace(1)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(1)* @.str3_as1, i64 0, i64 0)) nounwind ; <i32> [#uses=0]
br label %if.end
if.else16: ; preds = %if.else11
diff --git a/test/Transforms/SimplifyCFG/PR17073.ll b/test/Transforms/SimplifyCFG/PR17073.ll
index 8dc9fb2..e6e98b2 100644
--- a/test/Transforms/SimplifyCFG/PR17073.ll
+++ b/test/Transforms/SimplifyCFG/PR17073.ll
@@ -18,7 +18,7 @@ target triple = "i386-apple-macosx10.9.0"
; CHECK-NOT: select i1 %tobool, i32* null, i32* select (i1 icmp eq (i64 urem (i64 2, i64 zext (i1 icmp eq (i32* bitcast (i8* @b to i32*), i32* @a) to i64)), i64 0), i32* null, i32* @a)
define i32* @can_trap1() {
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %exit, label %block1
@@ -38,7 +38,7 @@ exit:
; CHECK-NOT: select i1 %tobool, i32* select (i1 icmp eq (i64 urem (i64 2, i64 zext (i1 icmp eq (i32* bitcast (i8* @b to i32*), i32* @a) to i64)), i64 0), i32* null, i32* @a), i32* null
define i32* @can_trap2() {
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %exit, label %block1
@@ -57,7 +57,7 @@ exit:
; CHECK: select i1 icmp eq (i32* bitcast (i8* @b to i32*), i32* @a), i32* select (i1 icmp eq (i64 add (i64 zext (i1 icmp eq (i32* bitcast (i8* @b to i32*), i32* @a) to i64), i64 2), i64 0), i32* null, i32* @a), i32* null
define i32* @cannot_trap() {
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %exit, label %block1
diff --git a/test/Transforms/SimplifyCFG/SpeculativeExec.ll b/test/Transforms/SimplifyCFG/SpeculativeExec.ll
index 31de3c8..c23a96d 100644
--- a/test/Transforms/SimplifyCFG/SpeculativeExec.ll
+++ b/test/Transforms/SimplifyCFG/SpeculativeExec.ll
@@ -34,11 +34,11 @@ define i8* @test4(i1* %dummy, i8* %a, i8* %b) {
; CHECK-LABEL: @test4(
entry:
- %cond1 = load volatile i1* %dummy
+ %cond1 = load volatile i1, i1* %dummy
br i1 %cond1, label %if, label %end
if:
- %cond2 = load volatile i1* %dummy
+ %cond2 = load volatile i1, i1* %dummy
br i1 %cond2, label %then, label %end
then:
diff --git a/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll b/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
index 22599b3..f3e5506 100644
--- a/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
+++ b/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
@@ -9,8 +9,8 @@ target triple = "x86_64-apple-darwin12.0.0"
; CHECK: entry:
; CHECK-NEXT: sub i3 %arg, -4
; CHECK-NEXT: zext i3 %switch.tableidx to i4
-; CHECK-NEXT: getelementptr inbounds [8 x i64]* @switch.table, i32 0, i4 %switch.tableidx.zext
-; CHECK-NEXT: load i64* %switch.gep
+; CHECK-NEXT: getelementptr inbounds [8 x i64], [8 x i64]* @switch.table, i32 0, i4 %switch.tableidx.zext
+; CHECK-NEXT: load i64, i64* %switch.gep
; CHECK-NEXT: add i64
; CHECK-NEXT: ret i64
define i64 @test(i3 %arg) {
diff --git a/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll b/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
index d0b8ab2..2600870 100644
--- a/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
+++ b/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
@@ -8,8 +8,8 @@ target triple = "x86_64-apple-darwin12.0.0"
; CHECK: entry:
; CHECK-NEXT: sub i2 %0, -2
; CHECK-NEXT: zext i2 %switch.tableidx to i3
-; CHECK-NEXT: getelementptr inbounds [4 x i64]* @switch.table, i32 0, i3 %switch.tableidx.zext
-; CHECK-NEXT: load i64* %switch.gep
+; CHECK-NEXT: getelementptr inbounds [4 x i64], [4 x i64]* @switch.table, i32 0, i3 %switch.tableidx.zext
+; CHECK-NEXT: load i64, i64* %switch.gep
; CHECK-NEXT: ret i64 %switch.load
define i64 @_TFO6reduce1E5toRawfS0_FT_Si(i2) {
entry:
diff --git a/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll b/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
index ea3b575..cdc0488 100644
--- a/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
+++ b/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
@@ -10,7 +10,7 @@ target triple = "x86_64-unknown-linux-gnu"
; CHECK: @switch.table1 = private unnamed_addr constant [4 x float] [float 0x40091EB860000000, float 0x3FF3BE76C0000000, float 0x4012449BA0000000, float 0x4001AE1480000000]
; The table for @foostring
-; CHECK: @switch.table2 = private unnamed_addr constant [4 x i8*] [i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8]* @.str1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8]* @.str2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8]* @.str3, i64 0, i64 0)]
+; CHECK: @switch.table2 = private unnamed_addr constant [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str3, i64 0, i64 0)]
; The table for @earlyreturncrash
; CHECK: @switch.table3 = private unnamed_addr constant [4 x i32] [i32 42, i32 9, i32 88, i32 5]
@@ -58,8 +58,8 @@ return:
; CHECK-NEXT: %0 = icmp ult i32 %switch.tableidx, 7
; CHECK-NEXT: br i1 %0, label %switch.lookup, label %return
; CHECK: switch.lookup:
-; CHECK-NEXT: %switch.gep = getelementptr inbounds [7 x i32]* @switch.table, i32 0, i32 %switch.tableidx
-; CHECK-NEXT: %switch.load = load i32* %switch.gep
+; CHECK-NEXT: %switch.gep = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table, i32 0, i32 %switch.tableidx
+; CHECK-NEXT: %switch.load = load i32, i32* %switch.gep
; CHECK-NEXT: ret i32 %switch.load
; CHECK: return:
; CHECK-NEXT: ret i32 15
@@ -97,8 +97,8 @@ sw.epilog:
; CHECK-NEXT: %switch.shiftamt = mul i32 %switch.tableidx, 8
; CHECK-NEXT: %switch.downshift = lshr i32 89655594, %switch.shiftamt
; CHECK-NEXT: %switch.masked = trunc i32 %switch.downshift to i8
-; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x float]* @switch.table1, i32 0, i32 %switch.tableidx
-; CHECK-NEXT: %switch.load = load float* %switch.gep
+; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x float], [4 x float]* @switch.table1, i32 0, i32 %switch.tableidx
+; CHECK-NEXT: %switch.load = load float, float* %switch.gep
; CHECK-NEXT: br label %sw.epilog
; CHECK: sw.epilog:
; CHECK-NEXT: %a.0 = phi i8 [ %switch.masked, %switch.lookup ], [ 7, %entry ]
@@ -131,11 +131,11 @@ sw.bb3: br label %return
sw.default: br label %return
return:
- %retval.0 = phi i8* [ getelementptr inbounds ([6 x i8]* @.str4, i64 0, i64 0), %sw.default ],
- [ getelementptr inbounds ([4 x i8]* @.str3, i64 0, i64 0), %sw.bb3 ],
- [ getelementptr inbounds ([4 x i8]* @.str2, i64 0, i64 0), %sw.bb2 ],
- [ getelementptr inbounds ([4 x i8]* @.str1, i64 0, i64 0), %sw.bb1 ],
- [ getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), %entry ]
+ %retval.0 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str4, i64 0, i64 0), %sw.default ],
+ [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str3, i64 0, i64 0), %sw.bb3 ],
+ [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str2, i64 0, i64 0), %sw.bb2 ],
+ [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str1, i64 0, i64 0), %sw.bb1 ],
+ [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %entry ]
ret i8* %retval.0
; CHECK-LABEL: @foostring(
@@ -144,8 +144,8 @@ return:
; CHECK-NEXT: %0 = icmp ult i32 %switch.tableidx, 4
; CHECK-NEXT: br i1 %0, label %switch.lookup, label %return
; CHECK: switch.lookup:
-; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i8*]* @switch.table2, i32 0, i32 %switch.tableidx
-; CHECK-NEXT: %switch.load = load i8** %switch.gep
+; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i8*], [4 x i8*]* @switch.table2, i32 0, i32 %switch.tableidx
+; CHECK-NEXT: %switch.load = load i8*, i8** %switch.gep
; CHECK-NEXT: ret i8* %switch.load
}
@@ -173,8 +173,8 @@ sw.epilog:
; CHECK-LABEL: @earlyreturncrash(
; CHECK: switch.lookup:
-; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i32]* @switch.table3, i32 0, i32 %switch.tableidx
-; CHECK-NEXT: %switch.load = load i32* %switch.gep
+; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table3, i32 0, i32 %switch.tableidx
+; CHECK-NEXT: %switch.load = load i32, i32* %switch.gep
; CHECK-NEXT: ret i32 %switch.load
; CHECK: sw.epilog:
; CHECK-NEXT: ret i32 7
@@ -749,7 +749,7 @@ return:
; CHECK-LABEL: @cprop(
; CHECK: switch.lookup:
-; CHECK: %switch.gep = getelementptr inbounds [7 x i32]* @switch.table5, i32 0, i32 %switch.tableidx
+; CHECK: %switch.gep = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table5, i32 0, i32 %switch.tableidx
}
define i32 @unreachable_case(i32 %x) {
@@ -778,7 +778,7 @@ return:
; CHECK-LABEL: @unreachable_case(
; CHECK: switch.lookup:
-; CHECK: getelementptr inbounds [9 x i32]* @switch.table6, i32 0, i32 %switch.tableidx
+; CHECK: getelementptr inbounds [9 x i32], [9 x i32]* @switch.table6, i32 0, i32 %switch.tableidx
}
define i32 @unreachable_default(i32 %x) {
@@ -805,8 +805,8 @@ return:
; CHECK-NEXT: %switch.tableidx = sub i32 %x, 0
; CHECK-NOT: icmp
; CHECK-NOT: br 1i
-; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i32]* @switch.table7, i32 0, i32 %switch.tableidx
-; CHECK-NEXT: %switch.load = load i32* %switch.gep
+; CHECK-NEXT: %switch.gep = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table7, i32 0, i32 %switch.tableidx
+; CHECK-NEXT: %switch.load = load i32, i32* %switch.gep
; CHECK-NEXT: ret i32 %switch.load
}
@@ -996,10 +996,10 @@ sw.bb2:
sw.default:
br label %return
return:
- %retval.0 = phi i32* [ getelementptr inbounds ([3 x i32]* @dllimport_d, i32 0, i32 0), %sw.default ],
- [ getelementptr inbounds ([3 x i32]* @dllimport_c, i32 0, i32 0), %sw.bb2 ],
- [ getelementptr inbounds ([3 x i32]* @dllimport_b, i32 0, i32 0), %sw.bb1 ],
- [ getelementptr inbounds ([3 x i32]* @dllimport_a, i32 0, i32 0), %entry ]
+ %retval.0 = phi i32* [ getelementptr inbounds ([3 x i32], [3 x i32]* @dllimport_d, i32 0, i32 0), %sw.default ],
+ [ getelementptr inbounds ([3 x i32], [3 x i32]* @dllimport_c, i32 0, i32 0), %sw.bb2 ],
+ [ getelementptr inbounds ([3 x i32], [3 x i32]* @dllimport_b, i32 0, i32 0), %sw.bb1 ],
+ [ getelementptr inbounds ([3 x i32], [3 x i32]* @dllimport_a, i32 0, i32 0), %entry ]
ret i32* %retval.0
; CHECK-LABEL: @dllimport(
; CHECK: switch i32
diff --git a/test/Transforms/SimplifyCFG/attr-noduplicate.ll b/test/Transforms/SimplifyCFG/attr-noduplicate.ll
index 523aa51..5f8456b 100644
--- a/test/Transforms/SimplifyCFG/attr-noduplicate.ll
+++ b/test/Transforms/SimplifyCFG/attr-noduplicate.ll
@@ -8,8 +8,8 @@
; CHECK-NOT: call void @barrier
define void @noduplicate(i32 %cond, i32* %out) {
entry:
- %out1 = getelementptr i32* %out, i32 1
- %out2 = getelementptr i32* %out, i32 2
+ %out1 = getelementptr i32, i32* %out, i32 1
+ %out2 = getelementptr i32, i32* %out, i32 2
%cmp = icmp eq i32 %cond, 0
br i1 %cmp, label %if.then, label %if.end
diff --git a/test/Transforms/SimplifyCFG/basictest.ll b/test/Transforms/SimplifyCFG/basictest.ll
index 5d9dad4..d228499 100644
--- a/test/Transforms/SimplifyCFG/basictest.ll
+++ b/test/Transforms/SimplifyCFG/basictest.ll
@@ -50,7 +50,7 @@ define i8 @test6f() {
; CHECK: alloca i8, align 1
; CHECK-NEXT: call i8 @test6g
; CHECK-NEXT: icmp eq i8 %tmp, 0
-; CHECK-NEXT: load i8* %r, align 1{{$}}
+; CHECK-NEXT: load i8, i8* %r, align 1{{$}}
bb0:
%r = alloca i8, align 1
@@ -58,7 +58,7 @@ bb0:
%tmp1 = icmp eq i8 %tmp, 0
br i1 %tmp1, label %bb2, label %bb1
bb1:
- %tmp3 = load i8* %r, align 1, !range !2, !tbaa !1
+ %tmp3 = load i8, i8* %r, align 1, !range !2, !tbaa !1
%tmp4 = icmp eq i8 %tmp3, 1
br i1 %tmp4, label %bb2, label %bb3
bb2:
diff --git a/test/Transforms/SimplifyCFG/branch-fold-dbg.ll b/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
index f715a0c..3ddd351f 100644
--- a/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
+++ b/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
@@ -24,7 +24,7 @@ BB2: ; preds = %BB1
;CHECK-NEXT: icmp eq
BB3: ; preds = %BB2
- %6 = getelementptr inbounds [5 x %0]* @0, i32 0, i32 %0, !dbg !6
+ %6 = getelementptr inbounds [5 x %0], [5 x %0]* @0, i32 0, i32 %0, !dbg !6
call void @llvm.dbg.value(metadata %0* %6, i64 0, metadata !7, metadata !{}), !dbg !12
%7 = icmp eq %0* %6, null, !dbg !13
br i1 %7, label %BB5, label %BB4, !dbg !13
@@ -41,19 +41,19 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.dbg.sp = !{!0}
-!0 = !{!"0x2e\00foo\00foo\00\00231\000\001\000\006\00256\000\000", !15, !1, !3, null, void (i32)* @foo, null, null, null} ; [ DW_TAG_subprogram ] [line 231] [def] [scope 0] [foo]
-!1 = !{!"0x29", !15} ; [ DW_TAG_file_type ]
-!2 = !{!"0x11\0012\00clang (trunk 129006)\001\00\000\00\000", !15, !4, !4, null, null, null} ; [ DW_TAG_compile_unit ]
-!3 = !{!"0x15\00\000\000\000\000\000\000", !15, !1, null, !4, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!0 = !MDSubprogram(name: "foo", line: 231, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !15, scope: !1, type: !3, function: void (i32)* @foo)
+!1 = !MDFile(filename: "a.c", directory: "/private/tmp")
+!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang (trunk 129006)", isOptimized: true, emissionKind: 0, file: !15, enums: !4, retainedTypes: !4)
+!3 = !MDSubroutineType(types: !4)
!4 = !{null}
!5 = !MDLocation(line: 131, column: 2, scope: !0)
!6 = !MDLocation(line: 134, column: 2, scope: !0)
-!7 = !{!"0x100\00bar\00232\000", !8, !1, !9} ; [ DW_TAG_auto_variable ]
-!8 = !{!"0xb\00231\001\003", !15, !0} ; [ DW_TAG_lexical_block ]
-!9 = !{!"0xf\00\000\0032\0032\000\000", null, !2, !10} ; [ DW_TAG_pointer_type ]
-!10 = !{!"0x26\00\000\000\000\000\000", null, !2, !11} ; [ DW_TAG_const_type ]
-!11 = !{!"0x24\00unsigned int\000\0032\0032\000\000\007", null, !2} ; [ DW_TAG_base_type ]
+!7 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "bar", line: 232, scope: !8, file: !1, type: !9)
+!8 = distinct !MDLexicalBlock(line: 231, column: 1, file: !15, scope: !0)
+!9 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !10)
+!10 = !MDDerivedType(tag: DW_TAG_const_type, scope: !2, baseType: !11)
+!11 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
!12 = !MDLocation(line: 232, column: 40, scope: !8)
!13 = !MDLocation(line: 234, column: 2, scope: !8)
!14 = !MDLocation(line: 274, column: 1, scope: !8)
-!15 = !{!"a.c", !"/private/tmp"}
+!15 = !MDFile(filename: "a.c", directory: "/private/tmp")
diff --git a/test/Transforms/SimplifyCFG/branch-fold-threshold.ll b/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
index 878c0a4..fad5fce 100644
--- a/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
+++ b/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
@@ -19,7 +19,7 @@ lor.lhs.false:
; AGGRESSIVE-NOT: br i1
cond.false:
- %0 = load i32* %input, align 4
+ %0 = load i32, i32* %input, align 4
br label %cond.end
cond.end:
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
index c19ba69..4c1b7e6 100644
--- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll
+++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
@@ -51,7 +51,7 @@ E:
br i1 %C, label %T, label %F
T: ; preds = %A, %E
call void @f3( )
- %XX = load i32* %AP ; <i32> [#uses=1]
+ %XX = load i32, i32* %AP ; <i32> [#uses=1]
store i32 %XX, i32* %BP
br i1 %C, label %B, label %A
A: ; preds = %T
diff --git a/test/Transforms/SimplifyCFG/dbginfo.ll b/test/Transforms/SimplifyCFG/dbginfo.ll
index 1a9f20a..12aec91 100644
--- a/test/Transforms/SimplifyCFG/dbginfo.ll
+++ b/test/Transforms/SimplifyCFG/dbginfo.ll
@@ -58,7 +58,7 @@ entry:
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
call void @llvm.dbg.func.start({ }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram947 to { }*))
store %struct.__false_type* %this, %struct.__false_type** %this_addr
- %0 = load %struct.__false_type** %this_addr, align 4 ; <%struct.__false_type*> [#uses=1]
+ %0 = load %struct.__false_type*, %struct.__false_type** %this_addr, align 4 ; <%struct.__false_type*> [#uses=1]
call void @_ZN9__gnu_cxx13new_allocatorIP5SceneED2Ev(%struct.__false_type* %0) nounwind
br label %bb
diff --git a/test/Transforms/SimplifyCFG/duplicate-landingpad.ll b/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
new file mode 100644
index 0000000..5402877
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
@@ -0,0 +1,110 @@
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
+
+declare i32 @__gxx_personality_v0(...)
+declare void @fn()
+
+
+; CHECK-LABEL: @test1
+define void @test1() {
+entry:
+; CHECK-LABEL: entry:
+; CHECK: to label %invoke2 unwind label %lpad2
+ invoke void @fn()
+ to label %invoke2 unwind label %lpad1
+
+invoke2:
+; CHECK-LABEL: invoke2:
+; CHECK: to label %invoke.cont unwind label %lpad2
+ invoke void @fn()
+ to label %invoke.cont unwind label %lpad2
+
+invoke.cont:
+ ret void
+
+lpad1:
+ %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ cleanup
+ br label %shared_resume
+
+lpad2:
+; CHECK-LABEL: lpad2:
+; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+; CHECK-NEXT: cleanup
+; CHECK-NEXT: call void @fn()
+; CHECK-NEXT: ret void
+ %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ cleanup
+ br label %shared_resume
+
+shared_resume:
+ call void @fn()
+ ret void
+}
+
+; Don't trigger if blocks aren't the same/empty
+define void @neg1() {
+; CHECK-LABEL: @neg1
+entry:
+; CHECK-LABEL: entry:
+; CHECK: to label %invoke2 unwind label %lpad1
+ invoke void @fn()
+ to label %invoke2 unwind label %lpad1
+
+invoke2:
+; CHECK-LABEL: invoke2:
+; CHECK: to label %invoke.cont unwind label %lpad2
+ invoke void @fn()
+ to label %invoke.cont unwind label %lpad2
+
+invoke.cont:
+ ret void
+
+lpad1:
+ %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ filter [0 x i8*] zeroinitializer
+ call void @fn()
+ br label %shared_resume
+
+lpad2:
+ %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ cleanup
+ br label %shared_resume
+
+shared_resume:
+ call void @fn()
+ ret void
+}
+
+; Should not trigger when the landing pads are not the exact same
+define void @neg2() {
+; CHECK-LABEL: @neg2
+entry:
+; CHECK-LABEL: entry:
+; CHECK: to label %invoke2 unwind label %lpad1
+ invoke void @fn()
+ to label %invoke2 unwind label %lpad1
+
+invoke2:
+; CHECK-LABEL: invoke2:
+; CHECK: to label %invoke.cont unwind label %lpad2
+ invoke void @fn()
+ to label %invoke.cont unwind label %lpad2
+
+invoke.cont:
+ ret void
+
+lpad1:
+ %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ filter [0 x i8*] zeroinitializer
+ br label %shared_resume
+
+lpad2:
+ %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ cleanup
+ br label %shared_resume
+
+shared_resume:
+ call void @fn()
+ ret void
+}
diff --git a/test/Transforms/SimplifyCFG/hoist-common-code.ll b/test/Transforms/SimplifyCFG/hoist-common-code.ll
index 5c83e2a..c1ca605 100644
--- a/test/Transforms/SimplifyCFG/hoist-common-code.ll
+++ b/test/Transforms/SimplifyCFG/hoist-common-code.ll
@@ -6,12 +6,12 @@ define void @test(i1 %P, i32* %Q) {
br i1 %P, label %T, label %F
T: ; preds = %0
store i32 1, i32* %Q
- %A = load i32* %Q ; <i32> [#uses=1]
+ %A = load i32, i32* %Q ; <i32> [#uses=1]
call void @bar( i32 %A )
ret void
F: ; preds = %0
store i32 1, i32* %Q
- %B = load i32* %Q ; <i32> [#uses=1]
+ %B = load i32, i32* %Q ; <i32> [#uses=1]
call void @bar( i32 %B )
ret void
}
diff --git a/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll b/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
index 869ce09..ac5ab60 100644
--- a/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
+++ b/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
@@ -1,8 +1,8 @@
; RUN: opt -simplifycfg -S < %s | FileCheck %s
define i32 @foo(i32 %i) nounwind ssp {
- call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !6, metadata !{}), !dbg !7
- call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !{}), !dbg !11
+ call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !6, metadata !MDExpression()), !dbg !7
+ call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !MDExpression()), !dbg !11
%1 = icmp ne i32 %i, 0, !dbg !12
;CHECK: call i32 (...)* @bar()
;CHECK-NEXT: llvm.dbg.value
@@ -10,12 +10,12 @@ define i32 @foo(i32 %i) nounwind ssp {
; <label>:2 ; preds = %0
%3 = call i32 (...)* @bar(), !dbg !13
- call void @llvm.dbg.value(metadata i32 %3, i64 0, metadata !9, metadata !{}), !dbg !13
+ call void @llvm.dbg.value(metadata i32 %3, i64 0, metadata !9, metadata !MDExpression()), !dbg !13
br label %6, !dbg !15
; <label>:4 ; preds = %0
%5 = call i32 (...)* @bar(), !dbg !16
- call void @llvm.dbg.value(metadata i32 %5, i64 0, metadata !9, metadata !{}), !dbg !16
+ call void @llvm.dbg.value(metadata i32 %5, i64 0, metadata !9, metadata !MDExpression()), !dbg !16
br label %6, !dbg !18
; <label>:6 ; preds = %4, %2
@@ -32,25 +32,25 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.module.flags = !{!21}
!llvm.dbg.sp = !{!0}
-!0 = !{!"0x2e\00foo\00foo\00\002\000\001\000\006\00256\000\000", !20, !1, !3, null, i32 (i32)* @foo, null, null, null} ; [ DW_TAG_subprogram ] [line 2] [def] [scope 0] [foo]
-!1 = !{!"0x29", !20} ; [ DW_TAG_file_type ]
-!2 = !{!"0x11\0012\00clang\001\00\000\00\000", !20, !8, !8, null, null, null} ; [ DW_TAG_compile_unit ]
-!3 = !{!"0x15\00\000\000\000\000\000\000", !20, !1, null, !4, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!0 = !MDSubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !1, type: !3, function: i32 (i32)* @foo)
+!1 = !MDFile(filename: "b.c", directory: "/private/tmp")
+!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: 0, file: !20, enums: !8, retainedTypes: !8)
+!3 = !MDSubroutineType(types: !4)
!4 = !{!5}
-!5 = !{!"0x24\00int\000\0032\0032\000\000\005", null, !2} ; [ DW_TAG_base_type ]
-!6 = !{!"0x101\00i\0016777218\000", !0, !1, !5} ; [ DW_TAG_arg_variable ]
+!5 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!6 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 2, arg: 1, scope: !0, file: !1, type: !5)
!7 = !MDLocation(line: 2, column: 13, scope: !0)
!8 = !{i32 0}
-!9 = !{!"0x100\00k\003\000", !10, !1, !5} ; [ DW_TAG_auto_variable ]
-!10 = !{!"0xb\002\0016\000", !20, !0} ; [ DW_TAG_lexical_block ]
+!9 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "k", line: 3, scope: !10, file: !1, type: !5)
+!10 = distinct !MDLexicalBlock(line: 2, column: 16, file: !20, scope: !0)
!11 = !MDLocation(line: 3, column: 12, scope: !10)
!12 = !MDLocation(line: 4, column: 3, scope: !10)
!13 = !MDLocation(line: 5, column: 5, scope: !14)
-!14 = !{!"0xb\004\0010\001", !20, !10} ; [ DW_TAG_lexical_block ]
+!14 = distinct !MDLexicalBlock(line: 4, column: 10, file: !20, scope: !10)
!15 = !MDLocation(line: 6, column: 3, scope: !14)
!16 = !MDLocation(line: 7, column: 5, scope: !17)
-!17 = !{!"0xb\006\0010\002", !20, !10} ; [ DW_TAG_lexical_block ]
+!17 = distinct !MDLexicalBlock(line: 6, column: 10, file: !20, scope: !10)
!18 = !MDLocation(line: 8, column: 3, scope: !17)
!19 = !MDLocation(line: 9, column: 3, scope: !10)
-!20 = !{!"b.c", !"/private/tmp"}
-!21 = !{i32 1, !"Debug Info Version", i32 2}
+!20 = !MDFile(filename: "b.c", directory: "/private/tmp")
+!21 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/test/Transforms/SimplifyCFG/hoist-with-range.ll b/test/Transforms/SimplifyCFG/hoist-with-range.ll
index 7ca3ff2..0a2b282 100644
--- a/test/Transforms/SimplifyCFG/hoist-with-range.ll
+++ b/test/Transforms/SimplifyCFG/hoist-with-range.ll
@@ -2,15 +2,15 @@
define void @foo(i1 %c, i8* %p) {
; CHECK: if:
-; CHECK-NEXT: load i8* %p, !range !0
+; CHECK-NEXT: load i8, i8* %p, !range !0
; CHECK: !0 = !{i8 0, i8 1, i8 3, i8 5}
if:
br i1 %c, label %then, label %else
then:
- %t = load i8* %p, !range !0
+ %t = load i8, i8* %p, !range !0
br label %out
else:
- %e = load i8* %p, !range !1
+ %e = load i8, i8* %p, !range !1
br label %out
out:
ret void
diff --git a/test/Transforms/SimplifyCFG/indirectbr.ll b/test/Transforms/SimplifyCFG/indirectbr.ll
index d0020d0..67e23d2 100644
--- a/test/Transforms/SimplifyCFG/indirectbr.ll
+++ b/test/Transforms/SimplifyCFG/indirectbr.ll
@@ -17,7 +17,7 @@ entry:
store i8* blockaddress(@indbrtest0, %BB1), i8** %P
store i8* blockaddress(@indbrtest0, %BB2), i8** %P
call void @foo()
- %t = load i8** %Q
+ %t = load i8*, i8** %Q
indirectbr i8* %t, [label %BB0, label %BB1, label %BB2, label %BB0, label %BB1, label %BB2]
BB0:
call void @A()
@@ -42,7 +42,7 @@ define void @indbrtest1(i8** %P, i8** %Q) {
entry:
store i8* blockaddress(@indbrtest1, %BB0), i8** %P
call void @foo()
- %t = load i8** %Q
+ %t = load i8*, i8** %Q
indirectbr i8* %t, [label %BB0, label %BB0]
BB0:
call void @A()
@@ -192,8 +192,8 @@ escape-string.top:
xlab8x: ; preds = %xlab5x
%xvaluex = call i32 @xselectorx()
- %xblkx.x = getelementptr [9 x i8*]* @xblkx.bbs, i32 0, i32 %xvaluex
- %xblkx.load = load i8** %xblkx.x
+ %xblkx.x = getelementptr [9 x i8*], [9 x i8*]* @xblkx.bbs, i32 0, i32 %xvaluex
+ %xblkx.load = load i8*, i8** %xblkx.x
indirectbr i8* %xblkx.load, [label %xblkx.begin, label %xblkx.begin3, label %xblkx.begin4, label %xblkx.begin5, label %xblkx.begin6, label %xblkx.begin7, label %xblkx.begin8, label %xblkx.begin9, label %xblkx.end]
xblkx.begin:
diff --git a/test/Transforms/SimplifyCFG/iterative-simplify.ll b/test/Transforms/SimplifyCFG/iterative-simplify.ll
index a397411..60728b9 100644
--- a/test/Transforms/SimplifyCFG/iterative-simplify.ll
+++ b/test/Transforms/SimplifyCFG/iterative-simplify.ll
@@ -17,13 +17,13 @@ cond_true: ; preds = %entry
br label %bb
bb: ; preds = %cond_next, %cond_true
- %tmp = load i32* %z ; <i32> [#uses=1]
+ %tmp = load i32, i32* %z ; <i32> [#uses=1]
%tmp1 = sub i32 %tmp, 16384 ; <i32> [#uses=1]
store i32 %tmp1, i32* %z
- %tmp2 = load i32* %i ; <i32> [#uses=1]
+ %tmp2 = load i32, i32* %i ; <i32> [#uses=1]
%tmp3 = add i32 %tmp2, 1 ; <i32> [#uses=1]
store i32 %tmp3, i32* %i
- %tmp4 = load i32* %i ; <i32> [#uses=1]
+ %tmp4 = load i32, i32* %i ; <i32> [#uses=1]
%tmp5 = icmp sgt i32 %tmp4, 262144 ; <i1> [#uses=1]
%tmp56 = zext i1 %tmp5 to i8 ; <i8> [#uses=1]
%toBool7 = icmp ne i8 %tmp56, 0 ; <i1> [#uses=1]
@@ -34,7 +34,7 @@ cond_true8: ; preds = %bb
unreachable
cond_next: ; preds = %bb
- %tmp9 = load i32* %z ; <i32> [#uses=1]
+ %tmp9 = load i32, i32* %z ; <i32> [#uses=1]
%tmp10 = icmp ne i32 %tmp9, 0 ; <i1> [#uses=1]
%tmp1011 = zext i1 %tmp10 to i8 ; <i8> [#uses=1]
%toBool12 = icmp ne i8 %tmp1011, 0 ; <i1> [#uses=1]
@@ -53,13 +53,13 @@ cond_true15: ; preds = %cond_false
br label %bb17
bb17: ; preds = %cond_next27, %cond_true15
- %tmp18 = load i32* %z16 ; <i32> [#uses=1]
+ %tmp18 = load i32, i32* %z16 ; <i32> [#uses=1]
%tmp19 = sub i32 %tmp18, 16384 ; <i32> [#uses=1]
store i32 %tmp19, i32* %z16
- %tmp20 = load i32* %i ; <i32> [#uses=1]
+ %tmp20 = load i32, i32* %i ; <i32> [#uses=1]
%tmp21 = add i32 %tmp20, 1 ; <i32> [#uses=1]
store i32 %tmp21, i32* %i
- %tmp22 = load i32* %i ; <i32> [#uses=1]
+ %tmp22 = load i32, i32* %i ; <i32> [#uses=1]
%tmp23 = icmp sgt i32 %tmp22, 262144 ; <i1> [#uses=1]
%tmp2324 = zext i1 %tmp23 to i8 ; <i8> [#uses=1]
%toBool25 = icmp ne i8 %tmp2324, 0 ; <i1> [#uses=1]
@@ -70,7 +70,7 @@ cond_true26: ; preds = %bb17
unreachable
cond_next27: ; preds = %bb17
- %tmp28 = load i32* %z16 ; <i32> [#uses=1]
+ %tmp28 = load i32, i32* %z16 ; <i32> [#uses=1]
%tmp29 = icmp ne i32 %tmp28, 0 ; <i1> [#uses=1]
%tmp2930 = zext i1 %tmp29 to i8 ; <i8> [#uses=1]
%toBool31 = icmp ne i8 %tmp2930, 0 ; <i1> [#uses=1]
@@ -91,7 +91,7 @@ cond_next35: ; preds = %cond_next34
br label %return
return: ; preds = %cond_next35
- %retval36 = load i32* %retval ; <i32> [#uses=1]
+ %retval36 = load i32, i32* %retval ; <i32> [#uses=1]
ret i32 %retval36
}
diff --git a/test/Transforms/SimplifyCFG/multiple-phis.ll b/test/Transforms/SimplifyCFG/multiple-phis.ll
index 7845423..a6eef09 100644
--- a/test/Transforms/SimplifyCFG/multiple-phis.ll
+++ b/test/Transforms/SimplifyCFG/multiple-phis.ll
@@ -22,8 +22,8 @@ while.body: ; preds = %while.cond
%add = add i32 %low.0, %high.addr.0
%div = udiv i32 %add, 2
%idxprom = zext i32 %div to i64
- %arrayidx = getelementptr inbounds i32* %r, i64 %idxprom
- %0 = load i32* %arrayidx
+ %arrayidx = getelementptr inbounds i32, i32* %r, i64 %idxprom
+ %0 = load i32, i32* %arrayidx
%cmp1 = icmp ult i32 %k, %0
br i1 %cmp1, label %if.then, label %if.else
diff --git a/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll b/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
index b388cc5..4792e95 100644
--- a/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
+++ b/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
@@ -8,7 +8,7 @@ entry:
br i1 %tobool, label %return, label %if.then
if.then: ; preds = %entry
- %0 = load i32* @g, align 4
+ %0 = load i32, i32* @g, align 4
br label %return
return: ; preds = %entry, %if.then
@@ -26,7 +26,7 @@ entry:
br i1 %tobool, label %return, label %if.then
if.then: ; preds = %entry
- %0 = load i32* @g, align 4
+ %0 = load i32, i32* @g, align 4
br label %return
return: ; preds = %entry, %if.then
@@ -34,7 +34,7 @@ return: ; preds = %entry, %if.then
ret i32 %retval
; CHECK-LABEL: @TestTsan
; CHECK: br i1
-; CHECK: load i32* @g
+; CHECK: load i32, i32* @g
; CHECK: br label
; CHECK: ret i32
}
diff --git a/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll b/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll
index f34aec5..c0f0046 100644
--- a/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll
+++ b/test/Transforms/SimplifyCFG/phi-undef-loadstore.ll
@@ -21,7 +21,7 @@ if.then4: ; preds = %if.else
if.end7: ; preds = %if.else, %if.then4, %if.then
%x.0 = phi i32* [ %a, %if.then ], [ %c, %if.then4 ], [ null, %if.else ]
- %tmp9 = load i32* %x.0
+ %tmp9 = load i32, i32* %x.0
ret i32 %tmp9
; CHECK-LABEL: @test1(
@@ -50,7 +50,7 @@ if.then4: ; preds = %if.else
if.end7: ; preds = %if.else, %if.then4, %if.then
%x.0 = phi i32* [ %a, %if.then ], [ null, %if.then4 ], [ null, %if.else ]
- %tmp9 = load i32* %x.0
+ %tmp9 = load i32, i32* %x.0
ret i32 %tmp9
; CHECK-LABEL: @test2(
; CHECK: if.else:
@@ -79,7 +79,7 @@ if.then4: ; preds = %if.else
if.end7: ; preds = %if.else, %if.then4, %if.then
%x.0 = phi i32* [ %a, %if.then ], [ null, %if.then4 ], [ null, %if.else ]
tail call void @bar() nounwind
- %tmp9 = load i32* %x.0
+ %tmp9 = load i32, i32* %x.0
ret i32 %tmp9
; CHECK-LABEL: @test3(
; CHECK: if.end7:
@@ -105,8 +105,8 @@ if.then4: ; preds = %if.else
if.end7: ; preds = %if.else, %if.then4, %if.then
%x.0 = phi i32* [ %a, %if.then ], [ null, %if.then4 ], [ null, %if.else ]
- %gep = getelementptr i32* %x.0, i32 10
- %tmp9 = load i32* %gep
+ %gep = getelementptr i32, i32* %x.0, i32 10
+ %tmp9 = load i32, i32* %gep
%tmp10 = or i32 %tmp9, 1
store i32 %tmp10, i32* %gep
ret i32 %tmp9
diff --git a/test/Transforms/SimplifyCFG/preserve-branchweights.ll b/test/Transforms/SimplifyCFG/preserve-branchweights.ll
index 7802a05..ae1794b 100644
--- a/test/Transforms/SimplifyCFG/preserve-branchweights.ll
+++ b/test/Transforms/SimplifyCFG/preserve-branchweights.ll
@@ -353,7 +353,7 @@ for.cond2:
%tobool = icmp eq i32 %bit.0, 0
br i1 %tobool, label %for.exit, label %for.body3, !prof !10
for.body3:
- %v3 = load i32* @max_regno, align 4
+ %v3 = load i32, i32* @max_regno, align 4
%cmp4 = icmp eq i32 %i.1, %v3
br i1 %cmp4, label %for.exit, label %for.inc, !prof !11
for.inc:
diff --git a/test/Transforms/SimplifyCFG/select-gep.ll b/test/Transforms/SimplifyCFG/select-gep.ll
index 43e46ca..f2bc5ab 100644
--- a/test/Transforms/SimplifyCFG/select-gep.ll
+++ b/test/Transforms/SimplifyCFG/select-gep.ll
@@ -8,7 +8,7 @@ entry:
br i1 %cmp, label %if.then, label %if.end
if.then:
- %incdec.ptr = getelementptr %ST* %x, i32 0, i32 1
+ %incdec.ptr = getelementptr %ST, %ST* %x, i32 0, i32 1
br label %if.end
if.end:
diff --git a/test/Transforms/SimplifyCFG/speculate-store.ll b/test/Transforms/SimplifyCFG/speculate-store.ll
index e241901..c1ac7bc 100644
--- a/test/Transforms/SimplifyCFG/speculate-store.ll
+++ b/test/Transforms/SimplifyCFG/speculate-store.ll
@@ -2,15 +2,15 @@
define void @ifconvertstore(i32 %m, i32* %A, i32* %B, i32 %C, i32 %D) {
entry:
- %arrayidx = getelementptr inbounds i32* %B, i64 0
- %0 = load i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, i32* %B, i64 0
+ %0 = load i32, i32* %arrayidx, align 4
%add = add nsw i32 %0, %C
- %arrayidx2 = getelementptr inbounds i32* %A, i64 0
+ %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 0
; First store to the location.
store i32 %add, i32* %arrayidx2, align 4
- %arrayidx4 = getelementptr inbounds i32* %B, i64 1
- %1 = load i32* %arrayidx4, align 4
+ %arrayidx4 = getelementptr inbounds i32, i32* %B, i64 1
+ %1 = load i32, i32* %arrayidx4, align 4
%add5 = add nsw i32 %1, %D
%cmp6 = icmp sgt i32 %add5, %C
br i1 %cmp6, label %if.then, label %ret.end
@@ -30,15 +30,15 @@ ret.end:
define void @noifconvertstore1(i32 %m, i32* %A, i32* %B, i32 %C, i32 %D) {
entry:
- %arrayidx = getelementptr inbounds i32* %B, i64 0
- %0 = load i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, i32* %B, i64 0
+ %0 = load i32, i32* %arrayidx, align 4
%add = add nsw i32 %0, %C
- %arrayidx2 = getelementptr inbounds i32* %A, i64 0
+ %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 0
; Store to a different location.
store i32 %add, i32* %arrayidx, align 4
- %arrayidx4 = getelementptr inbounds i32* %B, i64 1
- %1 = load i32* %arrayidx4, align 4
+ %arrayidx4 = getelementptr inbounds i32, i32* %B, i64 1
+ %1 = load i32, i32* %arrayidx4, align 4
%add5 = add nsw i32 %1, %D
%cmp6 = icmp sgt i32 %add5, %C
br i1 %cmp6, label %if.then, label %ret.end
@@ -57,16 +57,16 @@ declare void @unknown_fun()
define void @noifconvertstore2(i32 %m, i32* %A, i32* %B, i32 %C, i32 %D) {
entry:
- %arrayidx = getelementptr inbounds i32* %B, i64 0
- %0 = load i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, i32* %B, i64 0
+ %0 = load i32, i32* %arrayidx, align 4
%add = add nsw i32 %0, %C
- %arrayidx2 = getelementptr inbounds i32* %A, i64 0
+ %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 0
; First store to the location.
store i32 %add, i32* %arrayidx2, align 4
call void @unknown_fun()
- %arrayidx4 = getelementptr inbounds i32* %B, i64 1
- %1 = load i32* %arrayidx4, align 4
+ %arrayidx4 = getelementptr inbounds i32, i32* %B, i64 1
+ %1 = load i32, i32* %arrayidx4, align 4
%add5 = add nsw i32 %1, %D
%cmp6 = icmp sgt i32 %add5, %C
br i1 %cmp6, label %if.then, label %ret.end
@@ -83,15 +83,15 @@ ret.end:
define void @noifconvertstore_volatile(i32 %m, i32* %A, i32* %B, i32 %C, i32 %D) {
entry:
- %arrayidx = getelementptr inbounds i32* %B, i64 0
- %0 = load i32* %arrayidx, align 4
+ %arrayidx = getelementptr inbounds i32, i32* %B, i64 0
+ %0 = load i32, i32* %arrayidx, align 4
%add = add nsw i32 %0, %C
- %arrayidx2 = getelementptr inbounds i32* %A, i64 0
+ %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 0
; First store to the location.
store i32 %add, i32* %arrayidx2, align 4
- %arrayidx4 = getelementptr inbounds i32* %B, i64 1
- %1 = load i32* %arrayidx4, align 4
+ %arrayidx4 = getelementptr inbounds i32, i32* %B, i64 1
+ %1 = load i32, i32* %arrayidx4, align 4
%add5 = add nsw i32 %1, %D
%cmp6 = icmp sgt i32 %add5, %C
br i1 %cmp6, label %if.then, label %ret.end
diff --git a/test/Transforms/SimplifyCFG/speculate-with-offset.ll b/test/Transforms/SimplifyCFG/speculate-with-offset.ll
index 64fed85..65ebb5c 100644
--- a/test/Transforms/SimplifyCFG/speculate-with-offset.ll
+++ b/test/Transforms/SimplifyCFG/speculate-with-offset.ll
@@ -9,7 +9,7 @@
define void @yes(i1 %c) nounwind {
entry:
%a = alloca [4 x i64*], align 8
- %__a.addr = getelementptr [4 x i64*]* %a, i64 0, i64 3
+ %__a.addr = getelementptr [4 x i64*], [4 x i64*]* %a, i64 0, i64 3
call void @frob(i64** %__a.addr)
br i1 %c, label %if.then, label %if.end
@@ -17,7 +17,7 @@ if.then: ; preds = %entry
br label %return
if.end: ; preds = %entry
- %tmp5 = load i64** %__a.addr, align 8
+ %tmp5 = load i64*, i64** %__a.addr, align 8
br label %return
return: ; preds = %if.end, %if.then
@@ -31,7 +31,7 @@ return: ; preds = %if.end, %if.then
define void @no0(i1 %c) nounwind {
entry:
%a = alloca [4 x i64*], align 8
- %__a.addr = getelementptr [4 x i64*]* %a, i64 0, i64 4
+ %__a.addr = getelementptr [4 x i64*], [4 x i64*]* %a, i64 0, i64 4
call void @frob(i64** %__a.addr)
br i1 %c, label %if.then, label %if.end
@@ -39,7 +39,7 @@ if.then: ; preds = %entry
br label %return
if.end: ; preds = %entry
- %tmp5 = load i64** %__a.addr, align 8
+ %tmp5 = load i64*, i64** %__a.addr, align 8
br label %return
return: ; preds = %if.end, %if.then
@@ -53,7 +53,7 @@ return: ; preds = %if.end, %if.then
define void @no1(i1 %c, i64 %n) nounwind {
entry:
%a = alloca [4 x i64*], align 8
- %__a.addr = getelementptr [4 x i64*]* %a, i64 0, i64 %n
+ %__a.addr = getelementptr [4 x i64*], [4 x i64*]* %a, i64 0, i64 %n
call void @frob(i64** %__a.addr)
br i1 %c, label %if.then, label %if.end
@@ -61,7 +61,7 @@ if.then: ; preds = %entry
br label %return
if.end: ; preds = %entry
- %tmp5 = load i64** %__a.addr, align 8
+ %tmp5 = load i64*, i64** %__a.addr, align 8
br label %return
return: ; preds = %if.end, %if.then
@@ -75,7 +75,7 @@ return: ; preds = %if.end, %if.then
define void @no2(i1 %c, i64 %n) nounwind {
entry:
%a = alloca [4 x i64*], align 8
- %__a.addr = getelementptr [4 x i64*]* %a, i64 1, i64 0
+ %__a.addr = getelementptr [4 x i64*], [4 x i64*]* %a, i64 1, i64 0
call void @frob(i64** %__a.addr)
br i1 %c, label %if.then, label %if.end
@@ -83,7 +83,7 @@ if.then: ; preds = %entry
br label %return
if.end: ; preds = %entry
- %tmp5 = load i64** %__a.addr, align 8
+ %tmp5 = load i64*, i64** %__a.addr, align 8
br label %return
return: ; preds = %if.end, %if.then
diff --git a/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll b/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll
index ddf5d1f..f5359b5 100644
--- a/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll
+++ b/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll
@@ -20,12 +20,12 @@ define i32 @fn1() {
; CHECK: %switch.selectcmp1 = icmp eq i32 %1, 5
; CHECK: %switch.select2 = select i1 %switch.selectcmp1, i32 5, i32 %switch.select
entry:
- %0 = load i32* @b, align 4
+ %0 = load i32, i32* @b, align 4
%tobool = icmp eq i32 %0, 0
br i1 %tobool, label %if.end3, label %if.then
if.then:
- %1 = load i32* @a, align 4
+ %1 = load i32, i32* @a, align 4
switch i32 %1, label %if.end3 [
i32 5, label %return
i32 0, label %return
diff --git a/test/Transforms/SimplifyCFG/switch_create.ll b/test/Transforms/SimplifyCFG/switch_create.ll
index e1e9157..490b751 100644
--- a/test/Transforms/SimplifyCFG/switch_create.ll
+++ b/test/Transforms/SimplifyCFG/switch_create.ll
@@ -154,8 +154,8 @@ lor.end: ; preds = %entry, %entry, %ent
define i1 @test6({ i32, i32 }* %I) {
entry:
- %tmp.1.i = getelementptr { i32, i32 }* %I, i64 0, i32 1 ; <i32*> [#uses=1]
- %tmp.2.i = load i32* %tmp.1.i ; <i32> [#uses=6]
+ %tmp.1.i = getelementptr { i32, i32 }, { i32, i32 }* %I, i64 0, i32 1 ; <i32*> [#uses=1]
+ %tmp.2.i = load i32, i32* %tmp.1.i ; <i32> [#uses=6]
%tmp.2 = icmp eq i32 %tmp.2.i, 14 ; <i1> [#uses=1]
br i1 %tmp.2, label %shortcirc_done.4, label %shortcirc_next.0
shortcirc_next.0: ; preds = %entry
diff --git a/test/Transforms/SimplifyCFG/trap-debugloc.ll b/test/Transforms/SimplifyCFG/trap-debugloc.ll
index 24a286f..a86649b 100644
--- a/test/Transforms/SimplifyCFG/trap-debugloc.ll
+++ b/test/Transforms/SimplifyCFG/trap-debugloc.ll
@@ -11,14 +11,14 @@ define void @foo() nounwind ssp {
!llvm.module.flags = !{!10}
!llvm.dbg.sp = !{!0}
-!0 = !{!"0x2e\00foo\00foo\00\003\000\001\000\006\000\000\000", !8, !1, !3, null, void ()* @foo, null, null, null} ; [ DW_TAG_subprogram ] [line 3] [def] [scope 0] [foo]
-!1 = !{!"0x29", !8} ; [ DW_TAG_file_type ]
-!2 = !{!"0x11\0012\00Apple clang version 3.0 (tags/Apple/clang-206.1) (based on LLVM 3.0svn)\001\00\000\00\000", !8, !4, !4, !9, null, null} ; [ DW_TAG_compile_unit ]
-!3 = !{!"0x15\00\000\000\000\000\000\000", !8, !1, null, !4, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!0 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !1, type: !3, function: void ()* @foo)
+!1 = !MDFile(filename: "foo.c", directory: "/private/tmp")
+!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-206.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: 0, file: !8, enums: !4, retainedTypes: !4, subprograms: !9)
+!3 = !MDSubroutineType(types: !4)
!4 = !{null}
!5 = !MDLocation(line: 4, column: 2, scope: !6)
-!6 = !{!"0xb\003\0012\000", !8, !0} ; [ DW_TAG_lexical_block ]
+!6 = distinct !MDLexicalBlock(line: 3, column: 12, file: !8, scope: !0)
!7 = !MDLocation(line: 5, column: 1, scope: !6)
-!8 = !{!"foo.c", !"/private/tmp"}
+!8 = !MDFile(filename: "foo.c", directory: "/private/tmp")
!9 = !{!0}
-!10 = !{i32 1, !"Debug Info Version", i32 2}
+!10 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll b/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
index 5ae62af..5881367 100644
--- a/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
+++ b/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
@@ -11,7 +11,7 @@ entry:
br i1 %0, label %bb, label %return
bb: ; preds = %entry
- %1 = load volatile i32* null
+ %1 = load volatile i32, i32* null
unreachable
br label %return
diff --git a/test/Transforms/SimplifyCFG/unreachable-blocks.ll b/test/Transforms/SimplifyCFG/unreachable-blocks.ll
index 1df0eab..87a64ad 100644
--- a/test/Transforms/SimplifyCFG/unreachable-blocks.ll
+++ b/test/Transforms/SimplifyCFG/unreachable-blocks.ll
@@ -10,12 +10,12 @@ entry:
while_block: ; preds = %and_if_cont2, %and_if_cont
%newlen = sub i32 %newlen, 1
- %newptr = getelementptr i8* %newptr, i64 1
+ %newptr = getelementptr i8, i8* %newptr, i64 1
%test = icmp sgt i32 %newlen, 0
br i1 %test, label %and_if1, label %and_if_cont2
and_if1: ; preds = %while_block
- %char = load i8* %newptr
+ %char = load i8, i8* %newptr
%test2 = icmp ule i8 %char, 32
br label %and_if_cont2
diff --git a/test/Transforms/SimplifyCFG/volatile-phioper.ll b/test/Transforms/SimplifyCFG/volatile-phioper.ll
index 6367451..f2d4b8b 100644
--- a/test/Transforms/SimplifyCFG/volatile-phioper.ll
+++ b/test/Transforms/SimplifyCFG/volatile-phioper.ll
@@ -29,7 +29,7 @@ while.body: ; preds = %entry, %if.then, %w
%Addr.017 = phi i8* [ %incdec.ptr, %while.body ], [ null, %if.then ], [ null, %entry ]
%x.016 = phi i8 [ %inc, %while.body ], [ 0, %if.then ], [ 0, %entry ]
%inc = add i8 %x.016, 1
- %incdec.ptr = getelementptr inbounds i8* %Addr.017, i64 1
+ %incdec.ptr = getelementptr inbounds i8, i8* %Addr.017, i64 1
store volatile i8 %x.016, i8* %Addr.017, align 1
%0 = ptrtoint i8* %incdec.ptr to i64
%1 = trunc i64 %0 to i32