[llvm] c0429c6 - [BDCE] Convert tests to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 00:57:40 PST 2022
Author: Nikita Popov
Date: 2022-12-23T09:57:22+01:00
New Revision: c0429c60e916899d2fd864f46b0738f1a9081ded
URL: https://github.com/llvm/llvm-project/commit/c0429c60e916899d2fd864f46b0738f1a9081ded
DIFF: https://github.com/llvm/llvm-project/commit/c0429c60e916899d2fd864f46b0738f1a9081ded.diff
LOG: [BDCE] Convert tests to opaque pointers (NFC)
Added:
Modified:
llvm/test/Transforms/BDCE/dce-pure.ll
llvm/test/Transforms/BDCE/dead-void-ro.ll
llvm/test/Transforms/BDCE/invalidate-assumptions.ll
llvm/test/Transforms/BDCE/order.ll
llvm/test/Transforms/BDCE/pr41925.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/BDCE/dce-pure.ll b/llvm/test/Transforms/BDCE/dce-pure.ll
index f50f00f25b0b6..9fedaba2b5ab1 100644
--- a/llvm/test/Transforms/BDCE/dce-pure.ll
+++ b/llvm/test/Transforms/BDCE/dce-pure.ll
@@ -1,9 +1,9 @@
; RUN: opt -passes=bdce -S < %s | FileCheck %s
-declare i32 @strlen(i8*) readonly nounwind willreturn
+declare i32 @strlen(ptr) readonly nounwind willreturn
define void @test1() {
- call i32 @strlen( i8* null )
+ call i32 @strlen( ptr null )
ret void
; CHECK-LABEL: @test1
@@ -11,16 +11,16 @@ define void @test1() {
; CHECK: ret void
}
-define i32 @test2() personality i32 (...)* @__gxx_personality_v0 {
+define i32 @test2() personality ptr @__gxx_personality_v0 {
; invoke of pure function should not be deleted!
- invoke i32 @strlen( i8* null ) readnone
+ invoke i32 @strlen( ptr null ) readnone
to label %Cont unwind label %Other
Cont: ; preds = %0
ret i32 0
Other: ; preds = %0
- %exn = landingpad {i8*, i32}
+ %exn = landingpad {ptr, i32}
cleanup
ret i32 1
diff --git a/llvm/test/Transforms/BDCE/dead-void-ro.ll b/llvm/test/Transforms/BDCE/dead-void-ro.ll
index 5c3defd9c6dbd..45718ffe4edf8 100644
--- a/llvm/test/Transforms/BDCE/dead-void-ro.ll
+++ b/llvm/test/Transforms/BDCE/dead-void-ro.ll
@@ -2,13 +2,13 @@
target triple = "x86_64-unknown-linux-gnu"
-define void @PR34211(i16* %p) {
+define void @PR34211(ptr %p) {
; CHECK-LABEL: @PR34211
- %not_demanded_but_not_dead = load volatile i16, i16* %p
+ %not_demanded_but_not_dead = load volatile i16, ptr %p
call void @no_side_effects_so_dead(i16 %not_demanded_but_not_dead)
ret void
-; CHECK: %not_demanded_but_not_dead = load volatile i16, i16* %p
+; CHECK: %not_demanded_but_not_dead = load volatile i16, ptr %p
; CHECK-NEXT: ret void
}
diff --git a/llvm/test/Transforms/BDCE/invalidate-assumptions.ll b/llvm/test/Transforms/BDCE/invalidate-assumptions.ll
index 65ab5ecf35240..9cc85e33d8d4a 100644
--- a/llvm/test/Transforms/BDCE/invalidate-assumptions.ll
+++ b/llvm/test/Transforms/BDCE/invalidate-assumptions.ll
@@ -83,12 +83,12 @@ define i1 @poison_on_call_user_is_ok(i1 %b, i8 %x) {
; We were asserting that all users of a trivialized integer-type instruction were
; also integer-typed, but that's too strong. The alloca has a pointer-type result.
-define void @PR34179(i32* %a) {
+define void @PR34179(ptr %a) {
; CHECK-LABEL: @PR34179(
-; CHECK-NEXT: [[T0:%.*]] = load volatile i32, i32* [[A:%.*]]
+; CHECK-NEXT: [[T0:%.*]] = load volatile i32, ptr [[A:%.*]]
; CHECK-NEXT: ret void
;
- %t0 = load volatile i32, i32* %a
+ %t0 = load volatile i32, ptr %a
%vla = alloca i32, i32 %t0
ret void
}
diff --git a/llvm/test/Transforms/BDCE/order.ll b/llvm/test/Transforms/BDCE/order.ll
index af188144e06c2..8b0f2e8600db9 100644
--- a/llvm/test/Transforms/BDCE/order.ll
+++ b/llvm/test/Transforms/BDCE/order.ll
@@ -4,7 +4,7 @@ target triple = "x86_64-unknown-linux-gnu"
declare i32 @__gxx_personality_v0(...)
-define fastcc void @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define fastcc void @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb() #0 personality ptr @__gxx_personality_v0 {
entry:
br i1 undef, label %if.else, label %entry.if.end_crit_edge
@@ -12,7 +12,7 @@ if.else:
ret void
invoke.cont70:
- store i32 %call71, i32* undef, align 4
+ store i32 %call71, ptr undef, align 4
br label %if.else
; CHECK-LABEL: @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb
@@ -22,7 +22,7 @@ lpad65.loopexit.split-lp.loopexit.split-lp:
br label %if.else
lpad65.loopexit.split-lp.loopexit.split-lp.loopexit:
- %lpad.loopexit1121 = landingpad { i8*, i32 }
+ %lpad.loopexit1121 = landingpad { ptr, i32 }
cleanup
br label %lpad65.loopexit.split-lp.loopexit.split-lp
diff --git a/llvm/test/Transforms/BDCE/pr41925.ll b/llvm/test/Transforms/BDCE/pr41925.ll
index e6fba2226be44..cb511bbcefa2b 100644
--- a/llvm/test/Transforms/BDCE/pr41925.ll
+++ b/llvm/test/Transforms/BDCE/pr41925.ll
@@ -21,7 +21,7 @@ entry:
;CHECK: call void @llvm.dbg.value(metadata i8 2
;CHECK: call void @llvm.dbg.value(metadata i8 2
call void @llvm.dbg.value(metadata i8 2, metadata !17, metadata !DIExpression()), !dbg !18
- %.pr = load i8, i8* @b, align 1, !dbg !19
+ %.pr = load i8, ptr @b, align 1, !dbg !19
call void @llvm.dbg.value(metadata i8 2, metadata !17, metadata !DIExpression()), !dbg !18
%cmp5 = icmp slt i8 %.pr, 1, !dbg !22
br i1 %cmp5, label %for.cond2thread-pre-split.preheader, label %for.end9, !dbg !23
@@ -33,7 +33,7 @@ for.cond2thread-pre-split: ; preds = %for.cond2thread-pre
%l_177.06 = phi i8 [ %l_177.1.lcssa, %for.inc7 ], [ 2, %for.cond2thread-pre-split.preheader ]
call void @llvm.dbg.value(metadata i8 %l_177.06, metadata !17, metadata !DIExpression()), !dbg !18
;CHECK: call void @llvm.dbg.value(metadata i8 undef
- %.pr1 = load i8, i8* @a, align 1, !dbg !24
+ %.pr1 = load i8, ptr @a, align 1, !dbg !24
call void @llvm.dbg.value(metadata i8 %l_177.06, metadata !17, metadata !DIExpression()), !dbg !18
%cmp42 = icmp sgt i8 %.pr1, -1, !dbg !27
br i1 %cmp42, label %for.body6.preheader, label %for.inc7, !dbg !28
@@ -49,9 +49,9 @@ for.body6: ; preds = %for.body6.preheader
call void @llvm.dbg.value(metadata i8 %l_177.13, metadata !17, metadata !DIExpression(DW_OP_plus_uconst, 1, DW_OP_stack_value)), !dbg !18
tail call void (...) @optimize_me_not(), !dbg !29
%inc = add i8 %l_177.13, 1, !dbg !31
- %0 = load i8, i8* @a, align 1, !dbg !32
+ %0 = load i8, ptr @a, align 1, !dbg !32
%dec = add i8 %0, -1, !dbg !32
- store i8 %dec, i8* @a, align 1, !dbg !32
+ store i8 %dec, ptr @a, align 1, !dbg !32
call void @llvm.dbg.value(metadata i8 %inc, metadata !17, metadata !DIExpression()), !dbg !18
%cmp4 = icmp sgt i8 %dec, -1, !dbg !27
br i1 %cmp4, label %for.body6, label %for.inc7.loopexit, !dbg !28, !llvm.loop !33
@@ -63,9 +63,9 @@ for.inc7.loopexit: ; preds = %for.body6
for.inc7: ; preds = %for.inc7.loopexit, %for.cond2thread-pre-split
;CHECK: call void @llvm.dbg.value(metadata i8 undef
%l_177.1.lcssa = phi i8 [ %l_177.06, %for.cond2thread-pre-split ], [ %inc.lcssa, %for.inc7.loopexit ], !dbg !18
- %1 = load i8, i8* @b, align 1, !dbg !35
+ %1 = load i8, ptr @b, align 1, !dbg !35
%inc8 = add i8 %1, 1, !dbg !35
- store i8 %inc8, i8* @b, align 1, !dbg !35
+ store i8 %inc8, ptr @b, align 1, !dbg !35
call void @llvm.dbg.value(metadata i8 %l_177.1.lcssa, metadata !17, metadata !DIExpression()), !dbg !18
%cmp = icmp slt i8 %inc8, 1, !dbg !22
br i1 %cmp, label %for.cond2thread-pre-split, label %for.end9.loopexit, !dbg !23, !llvm.loop !36
More information about the llvm-commits
mailing list