From 11537c5fdac0cf040074043b143640ebbac4faa0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 23 Dec 2022 10:06:50 +0100 Subject: [PATCH] [LoopDeletion] Convert tests to opaque pointers (NFC) --- .../test/Transforms/LoopDeletion/2008-05-06-Phi.ll | 68 ++++++++++---------- .../LoopDeletion/2011-06-21-phioperands.ll | 8 +-- .../Transforms/LoopDeletion/D108848-regression.ll | 8 +-- llvm/test/Transforms/LoopDeletion/assume.ll | 10 +-- llvm/test/Transforms/LoopDeletion/bbi-59728.ll | 4 +- llvm/test/Transforms/LoopDeletion/diundef.ll | 2 +- .../LoopDeletion/eval_first_iteration.ll | 8 +-- .../LoopDeletion/noop-loops-with-subloops.ll | 26 ++++---- llvm/test/Transforms/LoopDeletion/pr49967.ll | 4 +- llvm/test/Transforms/LoopDeletion/pr53969.ll | 8 +-- .../LoopDeletion/simplify-then-delete.ll | 2 +- .../Transforms/LoopDeletion/two-predecessors.ll | 4 +- llvm/test/Transforms/LoopDeletion/update-scev.ll | 10 +-- llvm/test/Transforms/LoopDeletion/zero-btc.ll | 72 +++++++++++----------- 14 files changed, 116 insertions(+), 118 deletions(-) diff --git a/llvm/test/Transforms/LoopDeletion/2008-05-06-Phi.ll b/llvm/test/Transforms/LoopDeletion/2008-05-06-Phi.ll index 1f0e5b7..c96af55 100644 --- a/llvm/test/Transforms/LoopDeletion/2008-05-06-Phi.ll +++ b/llvm/test/Transforms/LoopDeletion/2008-05-06-Phi.ll @@ -3,58 +3,58 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin9" %struct.BF_BitstreamElement = type { i32, i16 } - %struct.BF_BitstreamPart = type { i32, %struct.BF_BitstreamElement* } - %struct.BF_PartHolder = type { i32, %struct.BF_BitstreamPart* } - %struct.Bit_stream_struc = type { i8*, i32, %struct.FILE*, i8*, i32, i32, i32, i32 } - %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } + %struct.BF_BitstreamPart = type { i32, ptr } + %struct.BF_PartHolder = type { i32, ptr } + %struct.Bit_stream_struc = type { ptr, i32, ptr, ptr, i32, i32, i32, i32 } + %struct.FILE = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } %struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] } %struct.III_side_info_t = type { i32, i32, i32, [2 x [4 x i32]], [2 x %struct.anon] } %struct.__sFILEX = type opaque - %struct.__sbuf = type { i8*, i32 } + %struct.__sbuf = type { ptr, i32 } %struct.anon = type { [2 x %struct.gr_info_ss] } - %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] } + %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, [4 x i32] } %struct.gr_info_ss = type { %struct.gr_info } - %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 } -@scaleFactorsPH = external global [2 x [2 x %struct.BF_PartHolder*]] ; <[2 x [2 x %struct.BF_PartHolder*]]*> [#uses=1] -@slen1_tab = external constant [16 x i32] ; <[16 x i32]*> [#uses=1] + %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 } +@scaleFactorsPH = external global [2 x [2 x ptr]] ; [#uses=1] +@slen1_tab = external constant [16 x i32] ; [#uses=1] -declare %struct.BF_PartHolder* @BF_addElement(%struct.BF_PartHolder*, %struct.BF_BitstreamElement*) nounwind +declare ptr @BF_addElement(ptr, ptr) nounwind -define %struct.BF_PartHolder* @BF_addEntry(%struct.BF_PartHolder* %thePH, i32 %value, i32 %length) nounwind { +define ptr @BF_addEntry(ptr %thePH, i32 %value, i32 %length) nounwind { entry: - %myElement = alloca %struct.BF_BitstreamElement ; <%struct.BF_BitstreamElement*> [#uses=2] - %tmp1 = getelementptr %struct.BF_BitstreamElement, %struct.BF_BitstreamElement* %myElement, i32 0, i32 0 ; [#uses=1] - store i32 %value, i32* %tmp1, align 8 + %myElement = alloca %struct.BF_BitstreamElement ; [#uses=2] + %tmp1 = getelementptr %struct.BF_BitstreamElement, ptr %myElement, i32 0, i32 0 ; [#uses=1] + store i32 %value, ptr %tmp1, align 8 %tmp7 = icmp eq i32 %length, 0 ; [#uses=1] br i1 %tmp7, label %bb13, label %bb bb: ; preds = %entry - %tmp10 = call %struct.BF_PartHolder* @BF_addElement( %struct.BF_PartHolder* %thePH, %struct.BF_BitstreamElement* %myElement ) nounwind ; <%struct.BF_PartHolder*> [#uses=1] - ret %struct.BF_PartHolder* %tmp10 + %tmp10 = call ptr @BF_addElement( ptr %thePH, ptr %myElement ) nounwind ; [#uses=1] + ret ptr %tmp10 bb13: ; preds = %entry - ret %struct.BF_PartHolder* %thePH + ret ptr %thePH } -define void @III_format_bitstream(%struct.lame_global_flags* %gfp, i32 %bitsPerFrame, [2 x [576 x i32]]* %l3_enc, %struct.III_side_info_t* %l3_side, [2 x %struct.III_scalefac_t]* %scalefac, %struct.Bit_stream_struc* %in_bs) nounwind { +define void @III_format_bitstream(ptr %gfp, i32 %bitsPerFrame, ptr %l3_enc, ptr %l3_side, ptr %scalefac, ptr %in_bs) nounwind { entry: - call fastcc void @encodeMainData( %struct.lame_global_flags* %gfp, [2 x [576 x i32]]* %l3_enc, %struct.III_side_info_t* %l3_side, [2 x %struct.III_scalefac_t]* %scalefac ) nounwind + call fastcc void @encodeMainData( ptr %gfp, ptr %l3_enc, ptr %l3_side, ptr %scalefac ) nounwind unreachable } -define internal fastcc void @encodeMainData(%struct.lame_global_flags* %gfp, [2 x [576 x i32]]* %l3_enc, %struct.III_side_info_t* %si, [2 x %struct.III_scalefac_t]* %scalefac) nounwind { +define internal fastcc void @encodeMainData(ptr %gfp, ptr %l3_enc, ptr %si, ptr %scalefac) nounwind { entry: - %tmp69 = getelementptr %struct.lame_global_flags, %struct.lame_global_flags* %gfp, i32 0, i32 43 ; [#uses=1] - %tmp70 = load i32, i32* %tmp69, align 4 ; [#uses=1] + %tmp69 = getelementptr %struct.lame_global_flags, ptr %gfp, i32 0, i32 43 ; [#uses=1] + %tmp70 = load i32, ptr %tmp69, align 4 ; [#uses=1] %tmp71 = icmp eq i32 %tmp70, 1 ; [#uses=1] br i1 %tmp71, label %bb352, label %bb498 bb113: ; preds = %bb132 - %tmp123 = getelementptr [2 x %struct.III_scalefac_t], [2 x %struct.III_scalefac_t]* %scalefac, i32 0, i32 0, i32 1, i32 %sfb.0, i32 %window.0 ; [#uses=1] - %tmp124 = load i32, i32* %tmp123, align 4 ; [#uses=1] - %tmp126 = load %struct.BF_PartHolder*, %struct.BF_PartHolder** %tmp80, align 4 ; <%struct.BF_PartHolder*> [#uses=1] - %tmp128 = call %struct.BF_PartHolder* @BF_addEntry( %struct.BF_PartHolder* %tmp126, i32 %tmp124, i32 %tmp93 ) nounwind ; <%struct.BF_PartHolder*> [#uses=1] - store %struct.BF_PartHolder* %tmp128, %struct.BF_PartHolder** %tmp80, align 4 + %tmp123 = getelementptr [2 x %struct.III_scalefac_t], ptr %scalefac, i32 0, i32 0, i32 1, i32 %sfb.0, i32 %window.0 ; [#uses=1] + %tmp124 = load i32, ptr %tmp123, align 4 ; [#uses=1] + %tmp126 = load ptr, ptr %tmp80, align 4 ; [#uses=1] + %tmp128 = call ptr @BF_addEntry( ptr %tmp126, i32 %tmp124, i32 %tmp93 ) nounwind ; [#uses=1] + store ptr %tmp128, ptr %tmp80, align 4 %tmp131 = add i32 %window.0, 1 ; [#uses=1] br label %bb132 @@ -73,8 +73,8 @@ bb140: ; preds = %bb341, %bb137 br i1 %tmp142, label %bb132, label %bb174 bb166: ; preds = %bb174 - %tmp160 = load %struct.BF_PartHolder*, %struct.BF_PartHolder** %tmp80, align 4 ; <%struct.BF_PartHolder*> [#uses=1] - %tmp162 = call %struct.BF_PartHolder* @BF_addEntry( %struct.BF_PartHolder* %tmp160, i32 0, i32 0 ) nounwind ; <%struct.BF_PartHolder*> [#uses=0] + %tmp160 = load ptr, ptr %tmp80, align 4 ; [#uses=1] + %tmp162 = call ptr @BF_addEntry( ptr %tmp160, i32 0, i32 0 ) nounwind ; [#uses=0] unreachable bb174: ; preds = %bb140 @@ -82,9 +82,9 @@ bb174: ; preds = %bb140 br i1 %tmp176, label %bb166, label %bb341 bb341: ; preds = %bb352, %bb174 - %tmp80 = getelementptr [2 x [2 x %struct.BF_PartHolder*]], [2 x [2 x %struct.BF_PartHolder*]]* @scaleFactorsPH, i32 0, i32 0, i32 0 ; <%struct.BF_PartHolder**> [#uses=3] - %tmp92 = getelementptr [16 x i32], [16 x i32]* @slen1_tab, i32 0, i32 0 ; [#uses=1] - %tmp93 = load i32, i32* %tmp92, align 4 ; [#uses=1] + %tmp80 = getelementptr [2 x [2 x ptr]], ptr @scaleFactorsPH, i32 0, i32 0, i32 0 ; [#uses=3] + %tmp92 = getelementptr [16 x i32], ptr @slen1_tab, i32 0, i32 0 ; [#uses=1] + %tmp93 = load i32, ptr %tmp92, align 4 ; [#uses=1] br label %bb140 bb352: ; preds = %entry @@ -98,12 +98,12 @@ return: ; preds = %bb352 ret void } -define void @getframebits(%struct.lame_global_flags* %gfp, i32* %bitsPerFrame, i32* %mean_bits) nounwind { +define void @getframebits(ptr %gfp, ptr %bitsPerFrame, ptr %mean_bits) nounwind { entry: unreachable } -define i32 @lame_encode_buffer(%struct.lame_global_flags* %gfp, i16* %buffer_l, i16* %buffer_r, i32 %nsamples, i8* %mp3buf, i32 %mp3buf_size) nounwind { +define i32 @lame_encode_buffer(ptr %gfp, ptr %buffer_l, ptr %buffer_r, i32 %nsamples, ptr %mp3buf, i32 %mp3buf_size) nounwind { entry: unreachable } diff --git a/llvm/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll b/llvm/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll index 546de37..7518f5d 100644 --- a/llvm/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll +++ b/llvm/test/Transforms/LoopDeletion/2011-06-21-phioperands.ll @@ -4,10 +4,10 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 %0 = type { %"class.llvm::SmallVectorImpl", [1 x %"union.llvm::SmallVectorBase::U"] } %"class.clang::SourceLocation" = type { i32 } -%"class.clang::driver::Arg" = type { %"class.clang::driver::Option"*, %"class.clang::driver::Arg"*, i32, i8, %0 } -%"class.clang::driver::Option" = type { i32 (...)**, i32, %"class.clang::SourceLocation", i8*, %"class.clang::driver::OptionGroup"*, %"class.clang::driver::Option"*, i8 } +%"class.clang::driver::Arg" = type { ptr, ptr, i32, i8, %0 } +%"class.clang::driver::Option" = type { ptr, i32, %"class.clang::SourceLocation", ptr, ptr, ptr, i8 } %"class.clang::driver::OptionGroup" = type { %"class.clang::driver::Option" } -%"class.llvm::SmallVectorBase" = type { i8*, i8*, i8*, %"union.llvm::SmallVectorBase::U" } +%"class.llvm::SmallVectorBase" = type { ptr, ptr, ptr, %"union.llvm::SmallVectorBase::U" } %"class.llvm::SmallVectorImpl" = type { %"class.llvm::SmallVectorTemplateBase" } %"class.llvm::SmallVectorTemplateBase" = type { %"class.llvm::SmallVectorTemplateCommon" } %"class.llvm::SmallVectorTemplateCommon" = type { %"class.llvm::SmallVectorBase" } @@ -165,7 +165,7 @@ if.end.i.us: ; preds = %for.cond.i.us br i1 true, label %for.cond.loopexit.us-lcssa.us, label %for.cond.i.us for.cond.loopexit.us-lcssa.us: ; preds = %if.end.i.us, %for.cond.i.us - %tmp178218.us.lcssa = phi %"class.clang::driver::Arg"** [ undef, %if.end.i.us ], [ undef, %for.cond.i.us ] + %tmp178218.us.lcssa = phi ptr [ undef, %if.end.i.us ], [ undef, %for.cond.i.us ] br label %for.cond.loopexit for.cond.i.preheader.split: ; preds = %for.cond.i.preheader.for.cond.i.preheader.split_crit_edge diff --git a/llvm/test/Transforms/LoopDeletion/D108848-regression.ll b/llvm/test/Transforms/LoopDeletion/D108848-regression.ll index e7ef04c..536e5d1 100644 --- a/llvm/test/Transforms/LoopDeletion/D108848-regression.ll +++ b/llvm/test/Transforms/LoopDeletion/D108848-regression.ll @@ -10,7 +10,7 @@ define i32 @main() { ; CHECK: for.body: ; CHECK-NEXT: [[D_015:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ] ; CHECK-NEXT: call void @foo() -; CHECK-NEXT: [[DOTB:%.*]] = load i1, i1* @a, align 4 +; CHECK-NEXT: [[DOTB:%.*]] = load i1, ptr @a, align 4 ; CHECK-NEXT: [[CONV1:%.*]] = select i1 [[DOTB]], i32 -128, i32 1 ; CHECK-NEXT: [[CMP2_NOT:%.*]] = icmp ugt i32 [[CONV1]], [[D_015]] ; CHECK-NEXT: br i1 [[CMP2_NOT]], label [[CLEANUP:%.*]], label [[FOR_INC8:%.*]] @@ -19,7 +19,7 @@ define i32 @main() { ; CHECK-NEXT: [[EXITCOND_NOT:%.*]] = icmp eq i32 [[INC9]], 19 ; CHECK-NEXT: br label [[CLEANUP]] ; CHECK: cleanup: -; CHECK-NEXT: store i1 true, i1* @a, align 4 +; CHECK-NEXT: store i1 true, ptr @a, align 4 ; CHECK-NEXT: ret i32 0 ; entry: @@ -28,7 +28,7 @@ entry: for.body: %d.015 = phi i32 [ 0, %entry ], [ %inc9, %for.inc8 ] call void @foo() - %.b = load i1, i1* @a, align 4 + %.b = load i1, ptr @a, align 4 %conv1 = select i1 %.b, i32 -128, i32 1 %cmp2.not = icmp ugt i32 %conv1, %d.015 br i1 %cmp2.not, label %cleanup, label %for.inc8 @@ -39,7 +39,7 @@ for.inc8: br i1 %exitcond.not, label %cleanup, label %for.body cleanup: - store i1 true, i1* @a, align 4 + store i1 true, ptr @a, align 4 ret i32 0 } diff --git a/llvm/test/Transforms/LoopDeletion/assume.ll b/llvm/test/Transforms/LoopDeletion/assume.ll index 6e2644e..2e5fe54 100644 --- a/llvm/test/Transforms/LoopDeletion/assume.ll +++ b/llvm/test/Transforms/LoopDeletion/assume.ll @@ -12,7 +12,7 @@ target triple = "x86_64-unknown-linux-gnu" %class.Domain.67 = type { %class.DomainBase.68 } %class.DomainBase.68 = type { i32 } -define dso_local void @_ZSt8_DestroyIP3LocILi3EES1_EvT_S3_RSaIT0_E(%class.Loc.95* %0) #0 { +define dso_local void @_ZSt8_DestroyIP3LocILi3EES1_EvT_S3_RSaIT0_E(ptr %0) #0 { ; CHECK-LABEL: @_ZSt8_DestroyIP3LocILi3EES1_EvT_S3_RSaIT0_E( ; CHECK-NEXT: br label [[_ZST8_DESTROYIP3LOCILI3EEEVT_S3__EXIT:%.*]] ; CHECK: _ZSt8_DestroyIP3LocILi3EEEvT_S3_.exit: @@ -21,13 +21,13 @@ define dso_local void @_ZSt8_DestroyIP3LocILi3EES1_EvT_S3_RSaIT0_E(%class.Loc.95 br label %2 2: ; preds = %4, %1 - %.0.i.i = phi %class.Loc.95* [ undef, %1 ], [ %5, %4 ] - %3 = icmp ne %class.Loc.95* %.0.i.i, %0 + %.0.i.i = phi ptr [ undef, %1 ], [ %5, %4 ] + %3 = icmp ne ptr %.0.i.i, %0 br i1 %3, label %4, label %_ZSt8_DestroyIP3LocILi3EEEvT_S3_.exit 4: ; preds = %2 - call void @llvm.assume(i1 true) [ "align"(%class.Loc.95* %.0.i.i, i64 4) ] - %5 = getelementptr inbounds %class.Loc.95, %class.Loc.95* %.0.i.i, i32 1 + call void @llvm.assume(i1 true) [ "align"(ptr %.0.i.i, i64 4) ] + %5 = getelementptr inbounds %class.Loc.95, ptr %.0.i.i, i32 1 br label %2 _ZSt8_DestroyIP3LocILi3EEEvT_S3_.exit: ; preds = %2 diff --git a/llvm/test/Transforms/LoopDeletion/bbi-59728.ll b/llvm/test/Transforms/LoopDeletion/bbi-59728.ll index 7f7426f..bf0ba37 100644 --- a/llvm/test/Transforms/LoopDeletion/bbi-59728.ll +++ b/llvm/test/Transforms/LoopDeletion/bbi-59728.ll @@ -9,7 +9,7 @@ define void @func_45() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[FOR_BODY45:%.*]] ; CHECK: for.body45: -; CHECK-NEXT: store i32 433429641, i32* undef, align 1 +; CHECK-NEXT: store i32 433429641, ptr undef, align 1 ; CHECK-NEXT: br label [[FOR_BODY45]] ; entry: @@ -19,7 +19,7 @@ for.body45: ; preds = %for.end72, %entry br label %for.body48 for.body48: ; preds = %for.body48, %for.body45 - store i32 433429641, i32* undef, align 1 + store i32 433429641, ptr undef, align 1 br i1 undef, label %for.body48, label %for.end72 for.end72: ; preds = %for.body48 diff --git a/llvm/test/Transforms/LoopDeletion/diundef.ll b/llvm/test/Transforms/LoopDeletion/diundef.ll index 35d68e8..14a6e40 100644 --- a/llvm/test/Transforms/LoopDeletion/diundef.ll +++ b/llvm/test/Transforms/LoopDeletion/diundef.ll @@ -22,7 +22,7 @@ for.cond: ; preds = %for.cond, %entry ; CHECK-NEXT: %call = tail call i32 {{.*}} @patatino() for.end: ; preds = %for.cond %call = tail call i32 (...) @patatino() #3, !dbg !27 - %0 = load i32, i32* @a, align 4, !dbg !28 + %0 = load i32, ptr @a, align 4, !dbg !28 ret i32 %0, !dbg !33 } diff --git a/llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll b/llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll index 23bf7f3..e9bbe9b 100644 --- a/llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll +++ b/llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll @@ -1217,12 +1217,11 @@ done: ; preds = %backedge @g = external global i32 -define void @ptr54615(i32* byval(i32) %arg) { +define void @ptr54615(ptr byval(i32) %arg) { ; CHECK-LABEL: @ptr54615( ; CHECK-NEXT: br label [[FOR_COND:%.*]] ; CHECK: for.cond: -; CHECK-NEXT: [[CAST:%.*]] = bitcast i32* @g to i32* -; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32* [[CAST]], [[ARG:%.*]] +; CHECK-NEXT: [[CMP:%.*]] = icmp eq ptr @g, [[ARG:%.*]] ; CHECK-NEXT: br i1 [[CMP]], label [[FOR_END:%.*]], label [[FOR_COND]] ; CHECK: for.end: ; CHECK-NEXT: ret void @@ -1230,8 +1229,7 @@ define void @ptr54615(i32* byval(i32) %arg) { br label %for.cond for.cond: - %cast = bitcast i32* @g to i32* - %cmp = icmp eq i32* %cast, %arg + %cmp = icmp eq ptr @g, %arg br i1 %cmp, label %for.end, label %for.cond for.end: diff --git a/llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll b/llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll index 0cf31a1..b1195ad 100644 --- a/llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll +++ b/llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll @@ -7,7 +7,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 ; The loop %inner cannot be removed, because it has outgoing values. But the ; outer loop is a no-op and can be removed. -define void @test1(i64 %N, i64 %M, %pair_t* %ptr) willreturn { +define void @test1(i64 %N, i64 %M, ptr %ptr) willreturn { ; CHECK-LABEL: @test1( ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[EXIT:%.*]] @@ -24,8 +24,8 @@ outer.header: inner: %inner.iv = phi i64 [ 0, %outer.header ], [ %inner.iv.next, %inner ] - %gep = getelementptr %pair_t, %pair_t* %ptr, i64 %inner.iv - %p = load %pair_t, %pair_t* %gep + %gep = getelementptr %pair_t, ptr %ptr, i64 %inner.iv + %p = load %pair_t, ptr %gep %v.0 = extractvalue %pair_t %p, 0 %v.1 = extractvalue %pair_t %p, 1 %inner.ec = icmp ult i64 %v.0, %v.1 @@ -45,7 +45,7 @@ exit: declare void @sideeffect() ; Same as @test1, but with a call in the outer loop. Nothing can be deleted. -define void @test2_sideeffect_in_outer(i64 %N, i64 %M, %pair_t* %ptr) willreturn { +define void @test2_sideeffect_in_outer(i64 %N, i64 %M, ptr %ptr) willreturn { ; CHECK-LABEL: @test2_sideeffect_in_outer( ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[OUTER_HEADER:%.*]] @@ -54,8 +54,8 @@ define void @test2_sideeffect_in_outer(i64 %N, i64 %M, %pair_t* %ptr) willreturn ; CHECK-NEXT: br label [[INNER:%.*]] ; CHECK: inner: ; CHECK-NEXT: [[INNER_IV:%.*]] = phi i64 [ 0, [[OUTER_HEADER]] ], [ [[INNER_IV_NEXT:%.*]], [[INNER]] ] -; CHECK-NEXT: [[GEP:%.*]] = getelementptr [[PAIR_T:%.*]], %pair_t* [[PTR:%.*]], i64 [[INNER_IV]] -; CHECK-NEXT: [[P:%.*]] = load [[PAIR_T]], %pair_t* [[GEP]], align 4 +; CHECK-NEXT: [[GEP:%.*]] = getelementptr [[PAIR_T:%.*]], ptr [[PTR:%.*]], i64 [[INNER_IV]] +; CHECK-NEXT: [[P:%.*]] = load [[PAIR_T]], ptr [[GEP]], align 4 ; CHECK-NEXT: [[V_0:%.*]] = extractvalue [[PAIR_T]] [[P]], 0 ; CHECK-NEXT: [[V_1:%.*]] = extractvalue [[PAIR_T]] [[P]], 1 ; CHECK-NEXT: [[INNER_EC:%.*]] = icmp ult i64 [[V_0]], [[V_1]] @@ -80,8 +80,8 @@ outer.header: inner: %inner.iv = phi i64 [ 0, %outer.header ], [ %inner.iv.next, %inner ] - %gep = getelementptr %pair_t, %pair_t* %ptr, i64 %inner.iv - %p = load %pair_t, %pair_t* %gep + %gep = getelementptr %pair_t, ptr %ptr, i64 %inner.iv + %p = load %pair_t, ptr %gep %v.0 = extractvalue %pair_t %p, 0 %v.1 = extractvalue %pair_t %p, 1 %inner.ec = icmp ult i64 %v.0, %v.1 @@ -100,7 +100,7 @@ exit: } ; Same as @test1, but with a call in the inner loop. Nothing can be deleted. -define void @test3_sideeffect_in_inner(i64 %N, i64 %M, %pair_t* %ptr) willreturn { +define void @test3_sideeffect_in_inner(i64 %N, i64 %M, ptr %ptr) willreturn { ; CHECK-LABEL: @test3_sideeffect_in_inner( ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[OUTER_HEADER:%.*]] @@ -109,8 +109,8 @@ define void @test3_sideeffect_in_inner(i64 %N, i64 %M, %pair_t* %ptr) willreturn ; CHECK-NEXT: br label [[INNER:%.*]] ; CHECK: inner: ; CHECK-NEXT: [[INNER_IV:%.*]] = phi i64 [ 0, [[OUTER_HEADER]] ], [ [[INNER_IV_NEXT:%.*]], [[INNER]] ] -; CHECK-NEXT: [[GEP:%.*]] = getelementptr [[PAIR_T:%.*]], %pair_t* [[PTR:%.*]], i64 [[INNER_IV]] -; CHECK-NEXT: [[P:%.*]] = load [[PAIR_T]], %pair_t* [[GEP]], align 4 +; CHECK-NEXT: [[GEP:%.*]] = getelementptr [[PAIR_T:%.*]], ptr [[PTR:%.*]], i64 [[INNER_IV]] +; CHECK-NEXT: [[P:%.*]] = load [[PAIR_T]], ptr [[GEP]], align 4 ; CHECK-NEXT: [[V_0:%.*]] = extractvalue [[PAIR_T]] [[P]], 0 ; CHECK-NEXT: [[V_1:%.*]] = extractvalue [[PAIR_T]] [[P]], 1 ; CHECK-NEXT: [[INNER_EC:%.*]] = icmp ult i64 [[V_0]], [[V_1]] @@ -135,8 +135,8 @@ outer.header: inner: %inner.iv = phi i64 [ 0, %outer.header ], [ %inner.iv.next, %inner ] - %gep = getelementptr %pair_t, %pair_t* %ptr, i64 %inner.iv - %p = load %pair_t, %pair_t* %gep + %gep = getelementptr %pair_t, ptr %ptr, i64 %inner.iv + %p = load %pair_t, ptr %gep %v.0 = extractvalue %pair_t %p, 0 %v.1 = extractvalue %pair_t %p, 1 %inner.ec = icmp ult i64 %v.0, %v.1 diff --git a/llvm/test/Transforms/LoopDeletion/pr49967.ll b/llvm/test/Transforms/LoopDeletion/pr49967.ll index 0fbf5dd..b0bc33b 100644 --- a/llvm/test/Transforms/LoopDeletion/pr49967.ll +++ b/llvm/test/Transforms/LoopDeletion/pr49967.ll @@ -15,7 +15,7 @@ define void @test() { ; CHECK-NEXT: br label [[FOR_COND_CLEANUP150_LOOPEXIT:%.*]] ; CHECK: for.body63: ; CHECK-NEXT: [[I58_010:%.*]] = phi i16 [ 32, [[VECTOR_PH]] ] -; CHECK-NEXT: store i16 undef, i16* undef, align 1 +; CHECK-NEXT: store i16 undef, ptr undef, align 1 ; CHECK-NEXT: [[INC89:%.*]] = add nuw nsw i16 [[I58_010]], 1 ; CHECK-NEXT: [[EXITCOND12_NOT:%.*]] = icmp eq i16 [[INC89]], 33 ; CHECK-NEXT: br label [[FOR_COND_CLEANUP62:%.*]] @@ -36,7 +36,7 @@ for.body151.preheader: ; preds = %for.cond.cleanup62 for.body63: ; preds = %for.body63, %vector.ph %i58.010 = phi i16 [ 32, %vector.ph ], [ %inc89, %for.body63 ] - store i16 undef, i16* undef, align 1 + store i16 undef, ptr undef, align 1 %inc89 = add nuw nsw i16 %i58.010, 1 %exitcond12.not = icmp eq i16 %inc89, 33 br i1 %exitcond12.not, label %for.cond.cleanup62, label %for.body63 diff --git a/llvm/test/Transforms/LoopDeletion/pr53969.ll b/llvm/test/Transforms/LoopDeletion/pr53969.ll index 5d454f8..f9b9dc3 100644 --- a/llvm/test/Transforms/LoopDeletion/pr53969.ll +++ b/llvm/test/Transforms/LoopDeletion/pr53969.ll @@ -45,7 +45,7 @@ define void @test() { ; CHECK: bb42: ; CHECK-NEXT: [[TMP24_LCSSA:%.*]] = phi i32 [ undef, [[BB22]] ] ; CHECK-NEXT: [[TMP18_LCSSA4:%.*]] = phi i64 [ 0, [[BB22]] ] -; CHECK-NEXT: store atomic i64 [[TMP18_LCSSA4]], i64 addrspace(1)* undef unordered, align 8 +; CHECK-NEXT: store atomic i64 [[TMP18_LCSSA4]], ptr addrspace(1) undef unordered, align 8 ; CHECK-NEXT: call void @use(i32 [[TMP24_LCSSA]]) ; CHECK-NEXT: ret void ; @@ -69,7 +69,7 @@ bb11: ; preds = %bb34 br i1 undef, label %bb33, label %bb34 bb12: ; preds = %bb34 - %tmp13 = icmp eq i8 addrspace(1)* undef, null + %tmp13 = icmp eq ptr addrspace(1) undef, null br label %bb14 bb14: ; preds = %bb25, %bb12 @@ -90,7 +90,7 @@ bb22: ; preds = %bb14 bb25: ; preds = %bb22 %tmp26 = add nuw nsw i32 %tmp17, 1 %tmp27 = zext i32 %tmp26 to i64 - %tmp28 = getelementptr inbounds i32, i32 addrspace(1)* undef, i64 %tmp27 + %tmp28 = getelementptr inbounds i32, ptr addrspace(1) undef, i64 %tmp27 %tmp29 = add i32 %tmp15, 3 %tmp30 = icmp ugt i32 %tmp17, 110 br i1 %tmp30, label %bb31, label %bb14 @@ -116,7 +116,7 @@ bb34: ; preds = %bb11, %bb1 br i1 undef, label %bb11, label %bb12 bb42: ; preds = %bb22 - store atomic i64 %tmp18, i64 addrspace(1)* undef unordered, align 8 + store atomic i64 %tmp18, ptr addrspace(1) undef unordered, align 8 call void @use(i32 %tmp24) ret void } diff --git a/llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll b/llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll index a265529..664578e 100644 --- a/llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll +++ b/llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll @@ -7,7 +7,7 @@ target datalayout = "e-p:64:64:64" -define i32 @pmat(i32 %m, i32 %n, double* %y) nounwind { +define i32 @pmat(i32 %m, i32 %n, ptr %y) nounwind { ; CHECK-LABEL: @pmat( ; CHECK-NEXT: entry: ; CHECK-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[M:%.*]], 0 diff --git a/llvm/test/Transforms/LoopDeletion/two-predecessors.ll b/llvm/test/Transforms/LoopDeletion/two-predecessors.ll index cf24960..366203e 100644 --- a/llvm/test/Transforms/LoopDeletion/two-predecessors.ll +++ b/llvm/test/Transforms/LoopDeletion/two-predecessors.ll @@ -15,7 +15,7 @@ define dso_local i32 @hoge() local_unnamed_addr #0 { ; CHECK-NEXT: br label [[BB2:%.*]] ; CHECK: bb2: ; CHECK-NEXT: [[TMP:%.*]] = phi i32 [ [[TMP3:%.*]], [[BB2]] ], [ undef, [[BB2_PREHEADER]] ] -; CHECK-NEXT: [[TMP3]] = tail call i32 bitcast (i32 (...)* @widget to i32 (i32)*)(i32 [[TMP]]) +; CHECK-NEXT: [[TMP3]] = tail call i32 @widget(i32 [[TMP]]) ; CHECK-NEXT: br label [[BB2]] ; bb: @@ -27,7 +27,7 @@ bb1: ; preds = %bb bb2: ; preds = %bb2, %bb1, %bb %tmp = phi i32 [ undef, %bb1 ], [ %tmp3, %bb2 ], [ undef, %bb ] - %tmp3 = tail call i32 bitcast (i32 (...)* @widget to i32 (i32)*)(i32 %tmp) #1 + %tmp3 = tail call i32 @widget(i32 %tmp) #1 br label %bb2 } diff --git a/llvm/test/Transforms/LoopDeletion/update-scev.ll b/llvm/test/Transforms/LoopDeletion/update-scev.ll index 71078d8b..64c7ca9 100644 --- a/llvm/test/Transforms/LoopDeletion/update-scev.ll +++ b/llvm/test/Transforms/LoopDeletion/update-scev.ll @@ -60,7 +60,7 @@ declare void @sideeffect(i32) ; LoopDeletion removes the loop %for.body7.1. Make sure %inc.lcssa.1 in the loop ; exit block is correctly invalidated. -define void @test2(double* %bx, i64 %by) local_unnamed_addr align 2 { +define void @test2(ptr %bx, i64 %by) local_unnamed_addr align 2 { ; IR-AFTER-TRANSFORM-LABEL: @test2( ; IR-AFTER-TRANSFORM-NOT: for.body7.1: @@ -106,8 +106,8 @@ for.body10.preheader: ; preds = %for.cond8.preheader for.body7: ; preds = %for.body7, %for.body7.preheader %ca.26 = phi i64 [ %inc, %for.body7 ], [ %ca.19, %for.body7.preheader ] %inc = add nsw i64 %ca.26, 1 - %arrayidx = getelementptr inbounds double, double* %bx, i64 %ca.26 - store double 0.000000e+00, double* %arrayidx, align 8 + %arrayidx = getelementptr inbounds double, ptr %bx, i64 %ca.26 + store double 0.000000e+00, ptr %arrayidx, align 8 br i1 false, label %for.cond8.preheader.loopexit, label %for.body7 for.body10: ; preds = %for.body10, %for.body10.preheader @@ -134,8 +134,8 @@ for.body7.preheader.1: ; preds = %for.cond5.preheader for.body7.1: ; preds = %for.body7.1, %for.body7.preheader.1 %ca.26.1 = phi i64 [ %inc.1, %for.body7.1 ], [ %ca.19.1, %for.body7.preheader.1 ] %inc.1 = add nsw i64 %ca.26.1, 1 - %arrayidx.1 = getelementptr inbounds double, double* %bx, i64 %ca.26.1 - store double 0.000000e+00, double* %arrayidx.1, align 8 + %arrayidx.1 = getelementptr inbounds double, ptr %bx, i64 %ca.26.1 + store double 0.000000e+00, ptr %arrayidx.1, align 8 br i1 true, label %for.cond8.preheader.loopexit.1, label %for.body7.1 for.cond8.preheader.loopexit.1: ; preds = %for.body7.1 diff --git a/llvm/test/Transforms/LoopDeletion/zero-btc.ll b/llvm/test/Transforms/LoopDeletion/zero-btc.ll index 6e2d81f..933b7f6 100644 --- a/llvm/test/Transforms/LoopDeletion/zero-btc.ll +++ b/llvm/test/Transforms/LoopDeletion/zero-btc.ll @@ -8,7 +8,7 @@ define void @test_trivial() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br label [[EXIT:%.*]] ; CHECK: exit: ; CHECK-NEXT: ret void @@ -17,7 +17,7 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br i1 false, label %loop, label %exit exit: @@ -31,7 +31,7 @@ define void @test_bottom_tested() { ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ] -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: [[IV_INC:%.*]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[BE_TAKEN:%.*]] = icmp ne i32 [[IV_INC]], 1 ; CHECK-NEXT: br label [[EXIT:%.*]] @@ -43,7 +43,7 @@ entry: loop: %iv = phi i32 [ 0, %entry], [ %iv.inc, %loop ] - store i32 0, i32* @G + store i32 0, ptr @G %iv.inc = add i32 %iv, 1 %be_taken = icmp ne i32 %iv.inc, 1 br i1 %be_taken, label %loop, label %exit @@ -58,7 +58,7 @@ define void @test_early_exit() { ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ] -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: [[IV_INC:%.*]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[BE_TAKEN:%.*]] = icmp ne i32 [[IV_INC]], 1 ; CHECK-NEXT: br i1 [[BE_TAKEN]], label [[LATCH:%.*]], label [[EXIT:%.*]] @@ -72,7 +72,7 @@ entry: loop: %iv = phi i32 [ 0, %entry], [ %iv.inc, %latch ] - store i32 0, i32* @G + store i32 0, ptr @G %iv.inc = add i32 %iv, 1 %be_taken = icmp ne i32 %iv.inc, 1 br i1 %be_taken, label %latch, label %exit @@ -89,12 +89,12 @@ define void @test_multi_exit1() { ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ] -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: [[IV_INC:%.*]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[BE_TAKEN:%.*]] = icmp ne i32 [[IV_INC]], 1 ; CHECK-NEXT: br i1 [[BE_TAKEN]], label [[LATCH:%.*]], label [[EXIT:%.*]] ; CHECK: latch: -; CHECK-NEXT: store i32 1, i32* @G, align 4 +; CHECK-NEXT: store i32 1, ptr @G, align 4 ; CHECK-NEXT: [[COND2:%.*]] = icmp ult i32 [[IV_INC]], 30 ; CHECK-NEXT: br label [[EXIT]] ; CHECK: exit: @@ -105,12 +105,12 @@ entry: loop: %iv = phi i32 [ 0, %entry], [ %iv.inc, %latch ] - store i32 0, i32* @G + store i32 0, ptr @G %iv.inc = add i32 %iv, 1 %be_taken = icmp ne i32 %iv.inc, 1 br i1 %be_taken, label %latch, label %exit latch: - store i32 1, i32* @G + store i32 1, ptr @G %cond2 = icmp ult i32 %iv.inc, 30 br i1 %cond2, label %loop, label %exit @@ -123,10 +123,10 @@ define void @test_multi_exit2() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br i1 true, label [[LATCH:%.*]], label [[EXIT:%.*]] ; CHECK: latch: -; CHECK-NEXT: store i32 1, i32* @G, align 4 +; CHECK-NEXT: store i32 1, ptr @G, align 4 ; CHECK-NEXT: br label [[EXIT]] ; CHECK: exit: ; CHECK-NEXT: ret void @@ -135,10 +135,10 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br i1 true, label %latch, label %exit latch: - store i32 1, i32* @G + store i32 1, ptr @G br i1 false, label %loop, label %exit exit: @@ -151,10 +151,10 @@ define void @test_multi_exit3(i1 %cond1) { ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ] -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br i1 [[COND1:%.*]], label [[LATCH:%.*]], label [[EXIT:%.*]] ; CHECK: latch: -; CHECK-NEXT: store i32 1, i32* @G, align 4 +; CHECK-NEXT: store i32 1, ptr @G, align 4 ; CHECK-NEXT: [[IV_INC:%.*]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[BE_TAKEN:%.*]] = icmp ne i32 [[IV_INC]], 1 ; CHECK-NEXT: br label [[EXIT]] @@ -166,10 +166,10 @@ entry: loop: %iv = phi i32 [ 0, %entry], [ %iv.inc, %latch ] - store i32 0, i32* @G + store i32 0, ptr @G br i1 %cond1, label %latch, label %exit latch: - store i32 1, i32* @G + store i32 1, ptr @G %iv.inc = add i32 %iv, 1 %be_taken = icmp ne i32 %iv.inc, 1 br i1 %be_taken, label %loop, label %exit @@ -185,10 +185,10 @@ define void @test_multi_exit4(i1 %cond1, i1 %cond2) { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br i1 [[COND1:%.*]], label [[LATCH:%.*]], label [[EXIT:%.*]] ; CHECK: latch: -; CHECK-NEXT: store i32 1, i32* @G, align 4 +; CHECK-NEXT: store i32 1, ptr @G, align 4 ; CHECK-NEXT: br i1 [[COND2:%.*]], label [[LOOP]], label [[EXIT]] ; CHECK: exit: ; CHECK-NEXT: ret void @@ -197,10 +197,10 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br i1 %cond1, label %latch, label %exit latch: - store i32 1, i32* @G + store i32 1, ptr @G br i1 %cond2, label %loop, label %exit exit: @@ -213,10 +213,10 @@ define void @test_multi_exit5() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br i1 true, label [[LATCH:%.*]], label [[EXIT1:%.*]] ; CHECK: latch: -; CHECK-NEXT: store i32 1, i32* @G, align 4 +; CHECK-NEXT: store i32 1, ptr @G, align 4 ; CHECK-NEXT: br label [[EXIT2:%.*]] ; CHECK: exit1: ; CHECK-NEXT: ret void @@ -227,10 +227,10 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br i1 true, label %latch, label %exit1 latch: - store i32 1, i32* @G + store i32 1, ptr @G br i1 false, label %loop, label %exit2 exit1: @@ -248,7 +248,7 @@ define void @test_dead_latch1() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br i1 false, label [[LATCH:%.*]], label [[EXIT1:%.*]] ; CHECK: latch: ; CHECK-NEXT: [[LATCHCOND:%.*]] = call i1 @unknown() @@ -262,7 +262,7 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br i1 false, label %latch, label %exit1 latch: %latchcond = call i1 @unknown() @@ -280,11 +280,11 @@ define void @test_live_inner() { ; CHECK-NEXT: entry: ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br label [[INNER:%.*]] ; CHECK: inner: ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[LOOP]] ], [ [[IV_INC:%.*]], [[INNER]] ] -; CHECK-NEXT: store i32 [[IV]], i32* @G, align 4 +; CHECK-NEXT: store i32 [[IV]], ptr @G, align 4 ; CHECK-NEXT: [[IV_INC]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[CND:%.*]] = icmp ult i32 [[IV_INC]], 200 ; CHECK-NEXT: br i1 [[CND]], label [[INNER]], label [[LATCH:%.*]] @@ -297,12 +297,12 @@ entry: br label %loop loop: - store i32 0, i32* @G + store i32 0, ptr @G br label %inner inner: %iv = phi i32 [0, %loop], [%iv.inc, %inner] - store i32 %iv, i32* @G + store i32 %iv, ptr @G %iv.inc = add i32 %iv, 1 %cnd = icmp ult i32 %iv.inc, 200 br i1 %cnd, label %inner, label %latch @@ -322,10 +322,10 @@ define void @test_live_outer() { ; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_INC:%.*]], [[LATCH:%.*]] ] ; CHECK-NEXT: br label [[INNER:%.*]] ; CHECK: inner: -; CHECK-NEXT: store i32 0, i32* @G, align 4 +; CHECK-NEXT: store i32 0, ptr @G, align 4 ; CHECK-NEXT: br label [[LATCH]] ; CHECK: latch: -; CHECK-NEXT: store i32 [[IV]], i32* @G, align 4 +; CHECK-NEXT: store i32 [[IV]], ptr @G, align 4 ; CHECK-NEXT: [[IV_INC]] = add i32 [[IV]], 1 ; CHECK-NEXT: [[CND:%.*]] = icmp ult i32 [[IV_INC]], 200 ; CHECK-NEXT: br i1 [[CND]], label [[LOOP]], label [[EXIT:%.*]] @@ -340,11 +340,11 @@ loop: br label %inner inner: - store i32 0, i32* @G + store i32 0, ptr @G br i1 false, label %inner, label %latch latch: - store i32 %iv, i32* @G + store i32 %iv, ptr @G %iv.inc = add i32 %iv, 1 %cnd = icmp ult i32 %iv.inc, 200 br i1 %cnd, label %loop, label %exit -- 2.7.4