From: Nikita Popov Date: Tue, 3 Jan 2023 11:52:47 +0000 (+0100) Subject: [CodeExtractor] Convert some tests to opaque pointers (NFC) X-Git-Tag: upstream/17.0.6~22329 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbbbbfbdcb1ab1ba9857138dfa0f2355da8e4499;p=platform%2Fupstream%2Fllvm.git [CodeExtractor] Convert some tests to opaque pointers (NFC) --- diff --git a/llvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll b/llvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll index 1319690..480b3d7 100644 --- a/llvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll +++ b/llvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll @@ -13,7 +13,7 @@ loopentry.1: ; preds = %no_exit.1, %loopentry.1.preheader br i1 false, label %no_exit.1, label %loopexit.0.loopexit1 no_exit.1: ; preds = %loopentry.1 - %tmp.53 = load i32, i32* null ; [#uses=1] + %tmp.53 = load i32, ptr null ; [#uses=1] br i1 false, label %shortcirc_next.2, label %loopentry.1 shortcirc_next.2: ; preds = %no_exit.1 diff --git a/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll b/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll index 57b7645..c132bb0 100644 --- a/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll +++ b/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll @@ -4,7 +4,7 @@ declare i32 @_IO_getc() declare void @__errno_location() -define void @yylex() personality i32 (...)* @__gcc_personality_v0 { +define void @yylex() personality ptr @__gcc_personality_v0 { entry: switch i32 0, label %label.126 [ i32 0, label %return @@ -190,8 +190,8 @@ return: ; preds = %entry ret void LongJmpBlkPre: ; preds = %endif.52, %then.40 - %exn = landingpad { i8*, i32 } - catch i8* null + %exn = landingpad { ptr, i32 } + catch ptr null ret void } diff --git a/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll b/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll index a533298..6593331 100644 --- a/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll +++ b/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -passes=extract-blocks -disable-output -define i32 @foo() personality i32 (...)* @__gcc_personality_v0 { +define i32 @foo() personality ptr @__gcc_personality_v0 { br label %EB EB: ; preds = %0 @@ -10,9 +10,9 @@ Cont: ; preds = %EB ret i32 %V Unw: ; preds = %EB - %exn = landingpad { i8*, i32 } - catch i8* null - resume { i8*, i32 } %exn + %exn = landingpad { ptr, i32 } + catch ptr null + resume { ptr, i32 } %exn } declare i32 @__gcc_personality_v0(...) diff --git a/llvm/test/Transforms/CodeExtractor/BlockAddressReference.ll b/llvm/test/Transforms/CodeExtractor/BlockAddressReference.ll index 6578da5..fc7875c 100644 --- a/llvm/test/Transforms/CodeExtractor/BlockAddressReference.ll +++ b/llvm/test/Transforms/CodeExtractor/BlockAddressReference.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -passes='function(loop-simplify),loop-extract' -S | FileCheck %s -@label = common local_unnamed_addr global i8* null +@label = common local_unnamed_addr global ptr null ; CHECK: define ; no outlined function @@ -9,8 +9,8 @@ define i32 @sterix(i32 %n) { entry: %tobool = icmp ne i32 %n, 0 ; this blockaddress references a basic block that goes in the extracted loop - %cond = select i1 %tobool, i8* blockaddress(@sterix, %for.cond), i8* blockaddress(@sterix, %exit) - store i8* %cond, i8** @label + %cond = select i1 %tobool, ptr blockaddress(@sterix, %for.cond), ptr blockaddress(@sterix, %exit) + store ptr %cond, ptr @label %cmp5 = icmp sgt i32 %n, 0 br i1 %cmp5, label %for.body, label %exit diff --git a/llvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll b/llvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll index ef1018f..ce71ffa 100644 --- a/llvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll +++ b/llvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll @@ -1,46 +1,46 @@ ; RUN: opt < %s -passes='function(loop-simplify),loop-extract' -S | FileCheck %s -@choum.addr = internal unnamed_addr constant [3 x i8*] [i8* blockaddress(@choum, %bb10), i8* blockaddress(@choum, %bb14), i8* blockaddress(@choum, %bb18)] +@choum.addr = internal unnamed_addr constant [3 x ptr] [ptr blockaddress(@choum, %bb10), ptr blockaddress(@choum, %bb14), ptr blockaddress(@choum, %bb18)] ; CHECK: define ; no outlined function ; CHECK-NOT: define -define void @choum(i32 %arg, i32* nocapture %arg1, i32 %arg2) { +define void @choum(i32 %arg, ptr nocapture %arg1, i32 %arg2) { bb: %tmp = icmp sgt i32 %arg, 0 br i1 %tmp, label %bb3, label %bb24 bb3: ; preds = %bb %tmp4 = sext i32 %arg2 to i64 - %tmp5 = getelementptr inbounds [3 x i8*], [3 x i8*]* @choum.addr, i64 0, i64 %tmp4 - %tmp6 = load i8*, i8** %tmp5 + %tmp5 = getelementptr inbounds [3 x ptr], ptr @choum.addr, i64 0, i64 %tmp4 + %tmp6 = load ptr, ptr %tmp5 %tmp7 = zext i32 %arg to i64 br label %bb8 bb8: ; preds = %bb18, %bb3 %tmp9 = phi i64 [ 0, %bb3 ], [ %tmp22, %bb18 ] - indirectbr i8* %tmp6, [label %bb10, label %bb14, label %bb18] + indirectbr ptr %tmp6, [label %bb10, label %bb14, label %bb18] bb10: ; preds = %bb8 - %tmp11 = getelementptr inbounds i32, i32* %arg1, i64 %tmp9 - %tmp12 = load i32, i32* %tmp11 + %tmp11 = getelementptr inbounds i32, ptr %arg1, i64 %tmp9 + %tmp12 = load i32, ptr %tmp11 %tmp13 = add nsw i32 %tmp12, 1 - store i32 %tmp13, i32* %tmp11 + store i32 %tmp13, ptr %tmp11 br label %bb14 bb14: ; preds = %bb10, %bb8 - %tmp15 = getelementptr inbounds i32, i32* %arg1, i64 %tmp9 - %tmp16 = load i32, i32* %tmp15 + %tmp15 = getelementptr inbounds i32, ptr %arg1, i64 %tmp9 + %tmp16 = load i32, ptr %tmp15 %tmp17 = shl nsw i32 %tmp16, 1 - store i32 %tmp17, i32* %tmp15 + store i32 %tmp17, ptr %tmp15 br label %bb18 bb18: ; preds = %bb14, %bb8 - %tmp19 = getelementptr inbounds i32, i32* %arg1, i64 %tmp9 - %tmp20 = load i32, i32* %tmp19 + %tmp19 = getelementptr inbounds i32, ptr %arg1, i64 %tmp9 + %tmp20 = load i32, ptr %tmp19 %tmp21 = add nsw i32 %tmp20, -3 - store i32 %tmp21, i32* %tmp19 + store i32 %tmp21, ptr %tmp19 %tmp22 = add nuw nsw i64 %tmp9, 1 %tmp23 = icmp eq i64 %tmp22, %tmp7 br i1 %tmp23, label %bb24, label %bb8 diff --git a/llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll b/llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll index 474e489..4a75027 100644 --- a/llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll +++ b/llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll @@ -10,17 +10,14 @@ ; CHECK-LABEL: define void @test() ; CHECK-NEXT: entry: ; CHECK-NEXT: %v1 = alloca i32 -; CHECK-NEXT: call void @llvm.dbg.value(metadata i32* %v1 -; CHECK-NEXT: %p1 = bitcast i32* %v1 to i8* -; CHECK-NEXT: call void @llvm.dbg.value(metadata i8* %p1, -; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 undef, i8* %p1, i64 4, i1 true) +; CHECK-NEXT: call void @llvm.dbg.value(metadata ptr %v1 +; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 undef, ptr %v1, i64 4, i1 true) ; CHECK-LABEL: define internal void @test.loop2() ; CHECK-NEXT: newFuncRoot: ; CHECK-NEXT: %v2 = alloca i32 -; CHECK-NEXT: %p2 = bitcast i32* %v2 to i8* -; CHECK-LABEL: define internal void @test.loop1(i8* %p1) +; CHECK-LABEL: define internal void @test.loop1(ptr %v1) ; CHECK-NEXT: newFuncRoot: ; CHECK-NEXT: br @@ -28,22 +25,20 @@ define void @test() { entry: %v1 = alloca i32, align 4 %v2 = alloca i32, align 4 - %p1 = bitcast i32* %v1 to i8* - %p2 = bitcast i32* %v2 to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 undef, i8* %p1, i64 4, i1 true) + call void @llvm.memcpy.p0.p0.i64(ptr align 4 undef, ptr %v1, i64 4, i1 true) br label %loop1 loop1: - call void @llvm.lifetime.start.p0i8(i64 4, i8* %p1) - %r1 = call i32 @foo(i8* %p1) - call void @llvm.lifetime.end.p0i8(i64 4, i8* %p1) + call void @llvm.lifetime.start.p0(i64 4, ptr %v1) + %r1 = call i32 @foo(ptr %v1) + call void @llvm.lifetime.end.p0(i64 4, ptr %v1) %cmp1 = icmp ne i32 %r1, 0 br i1 %cmp1, label %loop1, label %loop2 loop2: - call void @llvm.lifetime.start.p0i8(i64 4, i8* %p2) - %r2 = call i32 @foo(i8* %p2) - call void @llvm.lifetime.end.p0i8(i64 4, i8* %p2) + call void @llvm.lifetime.start.p0(i64 4, ptr %v2) + %r2 = call i32 @foo(ptr %v2) + call void @llvm.lifetime.end.p0(i64 4, ptr %v2) %cmp2 = icmp ne i32 %r2, 0 br i1 %cmp2, label %loop2, label %exit @@ -51,8 +46,8 @@ exit: ret void } -declare i32 @foo(i8*) +declare i32 @foo(ptr) -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) +declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca.ll index 2af08ec..9cdc37a 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca.ll @@ -2,7 +2,7 @@ ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s -%"class.base" = type { %"struct.base"* } +%"class.base" = type { ptr } %"struct.base" = type opaque @g = external local_unnamed_addr global i32, align 4 @@ -11,23 +11,20 @@ define i32 @callee_sinkable_bitcast(i32 %arg) local_unnamed_addr #0 { ; CHECK-LABEL:define{{.*}}@callee_sinkable_bitcast.{{[0-9]}} ; CHECK: alloca -; CHECK-NEXT: bitcast ; CHECK: call void @llvm.lifetime bb: %tmp = alloca %"class.base", align 4 - %tmp1 = bitcast %"class.base"* %tmp to i8* - %tmp2 = load i32, i32* @g, align 4, !tbaa !2 + %tmp2 = load i32, ptr @g, align 4, !tbaa !2 %tmp3 = add nsw i32 %tmp2, 1 %tmp4 = icmp slt i32 %arg, 0 br i1 %tmp4, label %bb6, label %bb5 bb5: ; preds = %bb - call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp1) #2 - %tmp11 = bitcast %"class.base"* %tmp to i32* - store i32 %tmp3, i32* %tmp11, align 4, !tbaa !2 - store i32 %tmp3, i32* @g, align 4, !tbaa !2 - call void @bar(i32* nonnull %tmp11) #2 - call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1) #2 + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #2 + store i32 %tmp3, ptr %tmp, align 4, !tbaa !2 + store i32 %tmp3, ptr @g, align 4, !tbaa !2 + call void @bar(ptr nonnull %tmp) #2 + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #2 br label %bb6 bb6: ; preds = %bb5, %bb @@ -35,14 +32,14 @@ bb6: ; preds = %bb5, %bb ret i32 %tmp7 } -declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #1 -declare void @bar(i32*) local_unnamed_addr #2 -declare void @bar2(i32*, i32*) local_unnamed_addr #1 +declare void @bar(ptr) local_unnamed_addr #2 +declare void @bar2(ptr, ptr) local_unnamed_addr #1 ; Function Attrs: argmemonly nounwind -declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define i32 @caller(i32 %arg) local_unnamed_addr #0 { diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca2.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca2.ll index 5b11971..f4a37e7 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca2.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineAlloca2.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s -%"class.base" = type { %"struct.base"* } +%"class.base" = type { ptr } %"struct.base" = type opaque @g = external local_unnamed_addr global i32, align 4 @@ -12,17 +12,16 @@ define i32 @callee_no_bitcast(i32 %arg) local_unnamed_addr #0 { ; CHECK: call void @llvm.lifetime bb: %tmp = alloca i8, align 4 - %tmp2 = load i32, i32* @g, align 4, !tbaa !2 + %tmp2 = load i32, ptr @g, align 4, !tbaa !2 %tmp3 = add nsw i32 %tmp2, 1 %tmp4 = icmp slt i32 %arg, 0 br i1 %tmp4, label %bb6, label %bb5 bb5: ; preds = %bb - call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp) #2 - store i32 %tmp3, i32* @g, align 4, !tbaa !2 - %tmp11 = bitcast i8 * %tmp to i32* - call void @bar(i32* nonnull %tmp11) #2 - call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp) #2 + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #2 + store i32 %tmp3, ptr @g, align 4, !tbaa !2 + call void @bar(ptr nonnull %tmp) #2 + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #2 br label %bb6 bb6: ; preds = %bb5, %bb @@ -31,14 +30,14 @@ bb6: ; preds = %bb5, %bb } ; Function Attrs: argmemonly nounwind -declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #1 -declare void @bar(i32*) local_unnamed_addr #2 -declare void @bar2(i32*, i32*) local_unnamed_addr #1 +declare void @bar(ptr) local_unnamed_addr #2 +declare void @bar2(ptr, ptr) local_unnamed_addr #1 ; Function Attrs: argmemonly nounwind -declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define i32 @caller(i32 %arg) local_unnamed_addr #0 { diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineCallRef.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineCallRef.ll index cc4fc9a..a7b50b6 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineCallRef.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineCallRef.ll @@ -5,7 +5,7 @@ declare void @foo(...) local_unnamed_addr #0 ; Function Attrs: noinline -define i32 @caller(i32 (i32)* nocapture %arg, i32 (i32)* nocapture %arg1, i32 %arg2) local_unnamed_addr #1 { +define i32 @caller(ptr nocapture %arg, ptr nocapture %arg1, i32 %arg2) local_unnamed_addr #1 { bb: %tmp = tail call i32 %arg(i32 %arg2) #0 %tmp3 = tail call i32 %arg1(i32 %arg2) #0 @@ -43,7 +43,7 @@ bb: ; check that caller is not wrongly inlined by partial inliner ; CHECK: call i32 @caller ; CHECK-NOT: call .* @bar - %tmp = tail call i32 @caller(i32 (i32)* nonnull @bar, i32 (i32)* nonnull @bar, i32 %arg) + %tmp = tail call i32 @caller(ptr nonnull @bar, ptr nonnull @bar, i32 %arg) ret i32 %tmp } diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll index b06da5d..29f71a5 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll @@ -1,35 +1,35 @@ ; RUN: opt < %s -skip-partial-inlining-cost-analysis -passes=partial-inliner -S | FileCheck %s -define i32 @Func(i1 %cond, i32* align 4 %align.val) !prof !1 { +define i32 @Func(i1 %cond, ptr align 4 %align.val) !prof !1 { ; CHECK: @Func({{.*}}) !prof [[REMAINCOUNT:![0-9]+]] entry: br i1 %cond, label %if.then, label %return if.then: ; Dummy store to have more than 0 uses - store i32 10, i32* %align.val, align 4 + store i32 10, ptr %align.val, align 4 br label %return return: ; preds = %entry ret i32 0 } -define internal i32 @Caller1(i1 %cond, i32* align 2 %align.val) !prof !3{ +define internal i32 @Caller1(i1 %cond, ptr align 2 %align.val) !prof !3{ entry: ; CHECK-LABEL: @Caller1 ; CHECK: br ; CHECK: call void @Func.1. ; CHECK: br ; CHECK: call void @Func.1. - %val = call i32 @Func(i1 %cond, i32* %align.val) - %val2 = call i32 @Func(i1 %cond, i32* %align.val) + %val = call i32 @Func(i1 %cond, ptr %align.val) + %val2 = call i32 @Func(i1 %cond, ptr %align.val) ret i32 %val } -define internal i32 @Caller2(i1 %cond, i32* align 2 %align.val) !prof !2{ +define internal i32 @Caller2(i1 %cond, ptr align 2 %align.val) !prof !2{ entry: ; CHECK-LABEL: @Caller2 ; CHECK: br ; CHECK: call void @Func.1. - %val = call i32 @Func(i1 %cond, i32* %align.val) + %val = call i32 @Func(i1 %cond, ptr %align.val) ret i32 %val } diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll index 3c80d79..bdf9e23 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll @@ -1,51 +1,50 @@ ; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s ; Function Attrs: nounwind uwtable -define dso_local i8* @bar(i32 %arg) local_unnamed_addr #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { +define dso_local ptr @bar(i32 %arg) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 { bb: %tmp = icmp slt i32 %arg, 0 br i1 %tmp, label %bb1, label %bb5 bb1: ; preds = %bb - %call26 = invoke i8* @invoke_callee() #2 + %call26 = invoke ptr @invoke_callee() #2 to label %cont unwind label %lpad lpad: ; preds = %if.end - %0 = landingpad { i8*, i32 } + %0 = landingpad { ptr, i32 } cleanup - resume { i8*, i32 } undef + resume { ptr, i32 } undef cont: br label %bb5 bb5: ; preds = %bb4, %bb1, %bb - %retval = phi i8* [ %call26, %cont ], [ undef, %bb] - ret i8* %retval + %retval = phi ptr [ %call26, %cont ], [ undef, %bb] + ret ptr %retval } ; CHECK-LABEL: @dummy_caller ; CHECK-LABEL: bb: -; CHECK-NEXT: [[CALL26LOC:%.*]] = alloca i8* +; CHECK-NEXT: [[CALL26LOC:%.*]] = alloca ptr ; CHECK-LABEL: codeRepl.i: -; CHECK-NEXT: %lt.cast.i = bitcast i8** [[CALL26LOC]] to i8* -; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast.i) -; CHECK-NEXT: call void @bar.1.bb1(i8** [[CALL26LOC]]) -; CHECK-NEXT: %call26.reload.i = load i8*, i8** [[CALL26LOC]] -; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 -1, i8* %lt.cast.i) -define i8* @dummy_caller(i32 %arg) { +; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 -1, ptr [[CALL26LOC]]) +; CHECK-NEXT: call void @bar.1.bb1(ptr [[CALL26LOC]]) +; CHECK-NEXT: %call26.reload.i = load ptr, ptr [[CALL26LOC]] +; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 -1, ptr [[CALL26LOC]]) +define ptr @dummy_caller(i32 %arg) { bb: - %tmp = tail call i8* @bar(i32 %arg) - ret i8* %tmp + %tmp = tail call ptr @bar(i32 %arg) + ret ptr %tmp } ; CHECK-LABEL: define internal void @bar.1.bb1 ; CHECK-LABEL: bb1: -; CHECK-NEXT: %call26 = invoke i8* @invoke_callee() +; CHECK-NEXT: %call26 = invoke ptr @invoke_callee() ; CHECK-NEXT: to label %cont unwind label %lpad ; CHECK-LABEL: cont: -; CHECK-NEXT: store i8* %call26, i8** %call26.out +; CHECK-NEXT: store ptr %call26, ptr %call26.out ; CHECK-NEXT: br label %bb5.exitStub ; Function Attrs: nobuiltin -declare dso_local noalias nonnull i8* @invoke_callee() local_unnamed_addr #1 +declare dso_local noalias nonnull ptr @invoke_callee() local_unnamed_addr #1 declare dso_local i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll index 16e6b5b..6652ec8 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll @@ -46,7 +46,7 @@ bb: ; CHECK-LABEL: define internal void @test.1.bb2() ; CHECK: .exitStub: -; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out +; CHECK-NOT: store i32 %tmp7, ptr %tmp7.out ; CHECK: ret diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineNoInline.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineNoInline.ll index f3345a7..177cf0b 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineNoInline.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineNoInline.ll @@ -4,23 +4,22 @@ define i32 @inline_fail(i32 %count, ...) { entry: - %vargs = alloca i8*, align 8 - %vargs1 = bitcast i8** %vargs to i8* - call void @llvm.va_start(i8* %vargs1) - %stat1 = load i32, i32* @stat, align 4 + %vargs = alloca ptr, align 8 + call void @llvm.va_start(ptr %vargs) + %stat1 = load i32, ptr @stat, align 4 %cmp = icmp slt i32 %stat1, 0 br i1 %cmp, label %bb2, label %bb1 bb1: ; preds = %entry %vg1 = add nsw i32 %stat1, 1 - store i32 %vg1, i32* @stat, align 4 - %va1 = va_arg i8** %vargs, i32 + store i32 %vg1, ptr @stat, align 4 + %va1 = va_arg ptr %vargs, i32 call void @foo(i32 %count, i32 %va1) #2 br label %bb2 bb2: ; preds = %bb1, %entry %res = phi i32 [ 1, %bb1 ], [ 0, %entry ] - call void @llvm.va_end(i8* %vargs1) + call void @llvm.va_end(ptr %vargs) ret i32 %res } @@ -31,8 +30,8 @@ bb: } declare void @foo(i32, i32) -declare void @llvm.va_start(i8*) -declare void @llvm.va_end(i8*) +declare void @llvm.va_start(ptr) +declare void @llvm.va_end(ptr) ; Check that no remarks have been emitted, inline_fail has not been partial ; inlined, no code has been extracted and the partial-inlining counter diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll index f70e023..06edbc1 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll @@ -49,7 +49,7 @@ bb: ; CHECK-LABEL: define internal void @test.1.bb2() ; CHECK: .exitStub: -; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out +; CHECK-NOT: store i32 %tmp7, ptr %tmp7.out ; CHECK: ret attributes #0 = { nounwind uwtable } diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineNotViable.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineNotViable.ll index 4534a9d..2f8f6a9 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineNotViable.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineNotViable.ll @@ -4,8 +4,8 @@ define i32 @callee_indr_branch(i32 %v) { entry: %cmp = icmp sgt i32 %v, 2000 - %addr = select i1 %cmp, i8* blockaddress(@callee_indr_branch, %if.then), i8* blockaddress(@callee_indr_branch, %if.end) - indirectbr i8* %addr, [ label %if.then, label %if.end] + %addr = select i1 %cmp, ptr blockaddress(@callee_indr_branch, %if.then), ptr blockaddress(@callee_indr_branch, %if.end) + indirectbr ptr %addr, [ label %if.then, label %if.end] if.then: ; preds = %entry %mul = mul nsw i32 %v, 10 @@ -21,17 +21,17 @@ if.end: ; preds = %if.then, %entry ret i32 %add } -declare void @use_fp(i8 *) +declare void @use_fp(ptr) declare void @llvm.localescape(...) -declare i8* @llvm.frameaddress(i32) -declare i8* @llvm.localrecover(i8*, i8*, i32) +declare ptr @llvm.frameaddress(i32) +declare ptr @llvm.localrecover(ptr, ptr, i32) define i32 @callee_frameescape(i32 %v) { entry: %a = alloca i32 - call void (...) @llvm.localescape(i32* %a) + call void (...) @llvm.localescape(ptr %a) %cmp = icmp sgt i32 %v, 2000 br i1 %cmp, label %if.then, label %if.end diff --git a/llvm/test/Transforms/CodeExtractor/PartialInlineORECrash.ll b/llvm/test/Transforms/CodeExtractor/PartialInlineORECrash.ll index 1baf581..7ed44fbd 100644 --- a/llvm/test/Transforms/CodeExtractor/PartialInlineORECrash.ll +++ b/llvm/test/Transforms/CodeExtractor/PartialInlineORECrash.ll @@ -3,40 +3,40 @@ target datalayout = "e-m:e-i64:64-n32:64" target triple = "powerpc64le-unknown-linux-gnu" -%0 = type { i32 (...)**, %1, %1, %3, %3, %3, i8, float, %4*, %5*, %5*, i32, i32, i32, i32, float, float, float, i8*, i32, float, float, float, i8, [7 x i8] } +%0 = type { ptr, %1, %1, %3, %3, %3, i8, float, ptr, ptr, ptr, i32, i32, i32, i32, float, float, float, ptr, i32, float, float, float, i8, [7 x i8] } %1 = type { %2, %3 } %2 = type { [3 x %3] } %3 = type { [4 x float] } -%4 = type <{ i8*, i16, i16, [4 x i8], i8*, i32, %3, %3, [4 x i8] }> -%5 = type { i32 (...)**, i32, i8* } -%6 = type <{ %7, [4 x i8], %19*, %20*, %30, %35, %3, float, i8, i8, i8, i8, %37, i32, [4 x i8] }> -%7 = type <{ %8, [7 x i8], void (%16*, float)*, void (%16*, float)*, i8*, %17 }> -%8 = type <{ i32 (...)**, %9, %11*, %12, %13*, %14*, %15*, i8 }> -%9 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %0**, i8, [7 x i8] }> -%11 = type { i32 (...)** } -%12 = type { float, i32, i32, float, i8, %15*, i8, i8, i8, float, i8, float, %13* } +%4 = type <{ ptr, i16, i16, [4 x i8], ptr, i32, %3, %3, [4 x i8] }> +%5 = type { ptr, i32, ptr } +%6 = type <{ %7, [4 x i8], ptr, ptr, %30, %35, %3, float, i8, i8, i8, i8, %37, i32, [4 x i8] }> +%7 = type <{ %8, [7 x i8], ptr, ptr, ptr, %17 }> +%8 = type <{ ptr, %9, ptr, %12, ptr, ptr, ptr, i8 }> +%9 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> +%11 = type { ptr } +%12 = type { float, i32, i32, float, i8, ptr, i8, i8, i8, float, i8, float, ptr } %13 = type opaque -%14 = type { i32 (...)** } -%15 = type { i32 (...)** } -%16 = type <{ %8, [7 x i8], void (%16*, float)*, void (%16*, float)*, i8*, %17, [4 x i8] }> +%14 = type { ptr } +%15 = type { ptr } +%16 = type <{ %8, [7 x i8], ptr, ptr, ptr, %17, [4 x i8] }> %17 = type { %18 } %18 = type { float, float, float, float, float, i32, float, float, float, float, float, i32, float, float, float, i32, i32 } -%19 = type { i32 (...)** } -%20 = type <{ i32 (...)**, %21, %25, %9, i8, [7 x i8] }> +%19 = type { ptr } +%20 = type <{ ptr, %21, %25, %9, i8, [7 x i8] }> %21 = type { %22 } -%22 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %24*, i8, [7 x i8] }> +%22 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> %24 = type { i32, i32 } -%25 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %27**, i8, [7 x i8] }> -%27 = type { i32, [4 x i8], [4 x %29], i8*, i8*, i32, float, float, i32 } -%29 = type <{ %3, %3, %3, %3, %3, float, float, float, i32, i32, i32, i32, [4 x i8], i8*, float, i8, [3 x i8], float, float, i32, %3, %3, [4 x i8] }> -%30 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %32**, i8, [7 x i8] }> -%32 = type { i32 (...)**, i32, i32, i32, i8, %33*, %33*, float, float, %3, %3, %3 } -%33 = type <{ %0, %2, %3, %3, float, %3, %3, %3, %3, %3, %3, %3, float, float, i8, [3 x i8], float, float, float, float, float, float, %34*, %30, i32, i32, i32, [4 x i8] }> -%34 = type { i32 (...)** } -%35 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %33**, i8, [7 x i8] }> -%37 = type <{ i8, [3 x i8], i32, i32, [4 x i8], %39**, i8, [7 x i8] }> -%39 = type { i32 (...)** } -%40 = type <{ i32 (...)**, %9, %11*, %12, %13*, %14*, %15*, i8, [7 x i8] }> +%25 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> +%27 = type { i32, [4 x i8], [4 x %29], ptr, ptr, i32, float, float, i32 } +%29 = type <{ %3, %3, %3, %3, %3, float, float, float, i32, i32, i32, i32, [4 x i8], ptr, float, i8, [3 x i8], float, float, i32, %3, %3, [4 x i8] }> +%30 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> +%32 = type { ptr, i32, i32, i32, i8, ptr, ptr, float, float, %3, %3, %3 } +%33 = type <{ %0, %2, %3, %3, float, %3, %3, %3, %3, %3, %3, %3, float, float, i8, [3 x i8], float, float, float, float, float, float, ptr, %30, i32, i32, i32, [4 x i8] }> +%34 = type { ptr } +%35 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> +%37 = type <{ i8, [3 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }> +%39 = type { ptr } +%40 = type <{ ptr, %9, ptr, %12, ptr, ptr, ptr, i8, [7 x i8] }> @gDisableDeactivation = external local_unnamed_addr global i8, align 1 @0 = external dso_local unnamed_addr constant [29 x i8], align 1 @@ -46,66 +46,66 @@ target triple = "powerpc64le-unknown-linux-gnu" declare void @_ZN15CProfileManager12Stop_ProfileEv() local_unnamed_addr -declare void @_ZN15CProfileManager13Start_ProfileEPKc(i8*) local_unnamed_addr +declare void @_ZN15CProfileManager13Start_ProfileEPKc(ptr) local_unnamed_addr -declare void @_ZN17btCollisionObject18setActivationStateEi(%0*, i32 signext) local_unnamed_addr +declare void @_ZN17btCollisionObject18setActivationStateEi(ptr, i32 signext) local_unnamed_addr -declare hidden void @__clang_call_terminate(i8*) local_unnamed_addr +declare hidden void @__clang_call_terminate(ptr) local_unnamed_addr declare i32 @__gxx_personality_v0(...) ; Function Attrs: argmemonly nounwind -declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #0 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1) #0 -define void @_ZN23btDiscreteDynamicsWorld28internalSingleStepSimulationEf(%6*, float) unnamed_addr align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !prof !27 { - invoke void null(%6* nonnull %0, float %1) +define void @_ZN23btDiscreteDynamicsWorld28internalSingleStepSimulationEf(ptr, float) unnamed_addr align 2 personality ptr @__gxx_personality_v0 !prof !27 { + invoke void null(ptr nonnull %0, float %1) to label %5 unwind label %3 ;