[llvm] 4982d8a - [test][llvm-reduce] Use opaque pointers in tests
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 16:47:59 PDT 2022
Author: Arthur Eubanks
Date: 2022-08-04T16:47:50-07:00
New Revision: 4982d8ac7694591d541492faac0f6d9091a18540
URL: https://github.com/llvm/llvm-project/commit/4982d8ac7694591d541492faac0f6d9091a18540
DIFF: https://github.com/llvm/llvm-project/commit/4982d8ac7694591d541492faac0f6d9091a18540.diff
LOG: [test][llvm-reduce] Use opaque pointers in tests
Added:
Modified:
llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll
llvm/test/tools/llvm-reduce/operands-skip.ll
llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll
llvm/test/tools/llvm-reduce/operands-to-args.ll
llvm/test/tools/llvm-reduce/reduce-operands.ll
llvm/test/tools/llvm-reduce/remove-alias.ll
llvm/test/tools/llvm-reduce/remove-args-2.ll
llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll
llvm/test/tools/llvm-reduce/remove-bbs-unwinded-to.ll
llvm/test/tools/llvm-reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll
llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll
llvm/test/tools/llvm-reduce/remove-global-vars.ll
llvm/test/tools/llvm-reduce/remove-instructions.ll
llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
llvm/test/tools/llvm-reduce/remove-metadata-args.ll
llvm/test/tools/llvm-reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll
llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll b/llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll
index 8d54da03924f6..152f83266f9eb 100644
--- a/llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll
+++ b/llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll
@@ -11,18 +11,18 @@
; RUN: FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-NOCALL %s < %t
-declare i8* @llvm.sponentry.p0i8()
+declare ptr @llvm.sponentry.p0()
declare i8 @uninteresting()
-; ALL-LABEL: define i8* @interesting(
-define i8* @interesting() {
+; ALL-LABEL: define ptr @interesting(
+define ptr @interesting() {
entry:
- ; CHECK-INTERESTINGNESS: call i8
+ ; CHECK-INTERESTINGNESS: call ptr
; CHECK-NOCALL-NOT: call i8
- ; CHECK-FINAL: %call = call i8* @llvm.sponentry.p0i8()
- ; CHECK-FINAL-NEXT: ret i8* %call
- %call = call i8* @llvm.sponentry.p0i8()
+ ; CHECK-FINAL: %call = call ptr @llvm.sponentry.p0()
+ ; CHECK-FINAL-NEXT: ret ptr %call
+ %call = call ptr @llvm.sponentry.p0()
call i8 @uninteresting()
- ret i8* %call
+ ret ptr %call
}
diff --git a/llvm/test/tools/llvm-reduce/operands-skip.ll b/llvm/test/tools/llvm-reduce/operands-skip.ll
index 5f13d59f939d0..415d67d722572 100644
--- a/llvm/test/tools/llvm-reduce/operands-skip.ll
+++ b/llvm/test/tools/llvm-reduce/operands-skip.ll
@@ -1,59 +1,59 @@
; RUN: llvm-reduce %s -o %t --delta-passes=operands-skip --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
; RUN: FileCheck %s --input-file %t --check-prefixes=REDUCED
-; INTERESTING: store i32 43, i32* {{(%imm|%indirect)}}, align 4
-; REDUCED: store i32 43, i32* %imm, align 4
+; INTERESTING: store i32 43, ptr {{(%imm|%indirect)}}, align 4
+; REDUCED: store i32 43, ptr %imm, align 4
-; INTERESTING: store i32 44, i32* {{(%imm|%indirect|%phi)}}, align 4
-; REDUCED: store i32 44, i32* %phi, align 4
+; INTERESTING: store i32 44, ptr {{(%imm|%indirect|%phi)}}, align 4
+; REDUCED: store i32 44, ptr %phi, align 4
-; INTERESTING: store i32 45, i32* {{(%imm|%indirect|%phi|%val)}}, align 4
-; REDUCED: store i32 45, i32* %val, align 4
+; INTERESTING: store i32 45, ptr {{(%imm|%indirect|%phi|%val)}}, align 4
+; REDUCED: store i32 45, ptr %val, align 4
-; INTERESTING: store i32 46, i32* {{(%imm|%indirect|%phi|%val|@Global)}}, align 4
-; REDUCED: store i32 46, i32* @Global, align 4
+; INTERESTING: store i32 46, ptr {{(%imm|%indirect|%phi|%val|@Global)}}, align 4
+; REDUCED: store i32 46, ptr @Global, align 4
-; INTERESTING: store i32 47, i32* {{(%imm|%indirect|%phi|%val|@Global|%arg2)}}, align 4
-; REDUCED: store i32 47, i32* %arg2, align 4
+; INTERESTING: store i32 47, ptr {{(%imm|%indirect|%phi|%val|@Global|%arg2)}}, align 4
+; REDUCED: store i32 47, ptr %arg2, align 4
-; INTERESTING: store i32 48, i32* {{(%imm|%indirect|%phi|%val|@Global|%arg2|%arg1)}}, align 4
-; REDUCED: store i32 48, i32* %arg1, align 4
+; INTERESTING: store i32 48, ptr {{(%imm|%indirect|%phi|%val|@Global|%arg2|%arg1)}}, align 4
+; REDUCED: store i32 48, ptr %arg1, align 4
-; INTERESTING: store i32 49, i32* {{(%imm|%indirect|%phi|%val|@Global|%arg2|%arg1|null)}}, align 4
-; REDUCED: store i32 49, i32* null, align 4
+; INTERESTING: store i32 49, ptr {{(%imm|%indirect|%phi|%val|@Global|%arg2|%arg1|null)}}, align 4
+; REDUCED: store i32 49, ptr null, align 4
-; REDUCED: store i32 50, i32* %arg1, align 4
-; REDUCED: store i32 51, i32* %arg1, align 4
+; REDUCED: store i32 50, ptr %arg1, align 4
+; REDUCED: store i32 51, ptr %arg1, align 4
@Global = global i32 42
-define void @func(i32* %arg1, i32* %arg2) {
+define void @func(ptr %arg1, ptr %arg2) {
entry:
- %val = getelementptr i32, i32* getelementptr (i32, i32* @Global, i32 1), i32 2
+ %val = getelementptr i32, ptr getelementptr (i32, ptr @Global, i32 1), i32 2
br i1 undef, label %branch, label %loop
branch:
- %nondominating1 = getelementptr i32, i32* %val, i32 3
+ %nondominating1 = getelementptr i32, ptr %val, i32 3
br label %loop
loop:
- %phi = phi i32* [ null, %entry ], [ %nondominating1, %branch ], [ %nondominating2, %loop ]
- %imm = getelementptr i32, i32* %phi, i32 4
- %indirect = getelementptr i32, i32* %imm, i32 5
-
- store i32 43, i32* %imm, align 4 ; Don't reduce to %indirect (not "more reduced" than %imm)
- store i32 44, i32* %imm, align 4 ; Reduce to %phi
- store i32 45, i32* %imm, align 4 ; Reduce to %val
- store i32 46, i32* %imm, align 4 ; Reduce to @Global
- store i32 47, i32* %imm, align 4 ; Reduce to %arg1
- store i32 48, i32* %imm, align 4 ; Reduce to %arg2
- store i32 49, i32* %imm, align 4 ; Reduce to null
-
- %nondominating2 = getelementptr i32, i32* %indirect, i32 6
+ %phi = phi ptr [ null, %entry ], [ %nondominating1, %branch ], [ %nondominating2, %loop ]
+ %imm = getelementptr i32, ptr %phi, i32 4
+ %indirect = getelementptr i32, ptr %imm, i32 5
+
+ store i32 43, ptr %imm, align 4 ; Don't reduce to %indirect (not "more reduced" than %imm)
+ store i32 44, ptr %imm, align 4 ; Reduce to %phi
+ store i32 45, ptr %imm, align 4 ; Reduce to %val
+ store i32 46, ptr %imm, align 4 ; Reduce to @Global
+ store i32 47, ptr %imm, align 4 ; Reduce to %arg1
+ store i32 48, ptr %imm, align 4 ; Reduce to %arg2
+ store i32 49, ptr %imm, align 4 ; Reduce to null
+
+ %nondominating2 = getelementptr i32, ptr %indirect, i32 6
br i1 undef, label %loop, label %exit
exit:
- store i32 50, i32* %arg2, align 4 ; Reduce to %arg1 (compactify function arguments)
- store i32 51, i32* %arg1, align 4 ; Don't reduce
+ store i32 50, ptr %arg2, align 4 ; Reduce to %arg1 (compactify function arguments)
+ store i32 51, ptr %arg1, align 4 ; Don't reduce
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll b/llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll
index 34e1648784c13..c654fd2cf7015 100644
--- a/llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll
+++ b/llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll
@@ -5,7 +5,7 @@
define void @foo() !dbg !7 {
entry:
%a = alloca i32
- call void @llvm.dbg.declare(metadata i32* %a, metadata !13, metadata !DIExpression()), !dbg !14
+ call void @llvm.dbg.declare(metadata ptr %a, metadata !13, metadata !DIExpression()), !dbg !14
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/operands-to-args.ll b/llvm/test/tools/llvm-reduce/operands-to-args.ll
index dbe59f70e6545..481487eed3a21 100644
--- a/llvm/test/tools/llvm-reduce/operands-to-args.ll
+++ b/llvm/test/tools/llvm-reduce/operands-to-args.ll
@@ -1,26 +1,26 @@
; RUN: llvm-reduce %s -o %t --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
; RUN: FileCheck %s --input-file %t --check-prefixes=REDUCED,INTERESTING
-; REDUCED-LABEL: define void @func(i32 %k, i32* %Local, i32* %Global, float* %0) {
+; REDUCED-LABEL: define void @func(i32 %k, ptr %Local, ptr %Global) {
; Keep one reference to the original value.
; INTERESTING: %[[LOCAL:Local[0-9]*]] = alloca i32, align 4
-; INTERESTING: store i32 42, i32* %[[LOCAL]], align 4
-; INTERESTING: store i32 42, i32* @Global, align 4
+; INTERESTING: store i32 42, ptr %[[LOCAL]], align 4
+; INTERESTING: store i32 42, ptr @Global, align 4
; Everything else must use the function argument.
-; REDUCED: store i32 21, i32* %Local, align 4
-; REDUCED: store i32 21, i32* %Global, align 4
-; REDUCED: store i32 0, i32* %Local, align 4
-; REDUCED: store i32 0, i32* %Global, align 4
-; REDUCED: store float 0.000000e+00, float* %0, align 4
+; REDUCED: store i32 21, ptr %Local, align 4
+; REDUCED: store i32 21, ptr %Global, align 4
+; REDUCED: store i32 0, ptr %Local, align 4
+; REDUCED: store i32 0, ptr %Global, align 4
+; REDUCED: store float 0.000000e+00, ptr %Global, align 4
; Do not add any arguments for %Keep and @GlobalKeep.
; INTERESTING: %[[KEEP:LocalKeep[0-9]*]] = add i32 %k, 21
-; INTERESTING: store i32 %[[KEEP]], i32* @GlobalKeep, align 4
+; INTERESTING: store i32 %[[KEEP]], ptr @GlobalKeep, align 4
; INTERESTING-LABEL: define void @func_caller() {
-; REDUCED: call void @func(i32 21, i32* null, i32* null, float* null)
+; REDUCED: call void @func(i32 21, ptr null, ptr null)
@Global = global i32 42
@@ -30,19 +30,19 @@ define void @func(i32 %k) {
entry:
%Local = alloca i32, align 4
- store i32 42, i32* %Local, align 4
- store i32 42, i32* @Global, align 4
+ store i32 42, ptr %Local, align 4
+ store i32 42, ptr @Global, align 4
- store i32 21, i32* %Local, align 4
- store i32 21, i32* @Global, align 4
+ store i32 21, ptr %Local, align 4
+ store i32 21, ptr @Global, align 4
- store i32 0, i32* %Local, align 4
- store i32 0, i32* @Global, align 4
+ store i32 0, ptr %Local, align 4
+ store i32 0, ptr @Global, align 4
- store float 0.000000e+00, float* bitcast (i32* @Global to float*), align 4
+ store float 0.000000e+00, ptr @Global, align 4
%LocalKeep = add i32 %k, 21
- store i32 %LocalKeep, i32* @GlobalKeep, align 4
+ store i32 %LocalKeep, ptr @GlobalKeep, align 4
ret void
}
@@ -56,17 +56,16 @@ entry:
; Make sure to skip functions with non-direct call users
-declare void @e(i8*)
+declare void @e(ptr)
; INTERESTING-LABEL: define void @g() {
define void @g() {
- call void @e(i8* bitcast (void (i8**)* @f to i8*))
+ call void @e(ptr @f)
ret void
}
-; INTERESTING-LABEL: define void @f(i8** %a) {
-define void @f(i8** %a) {
- %1 = load i8*, i8** %a
- %2 = bitcast i8* %1 to i32*
+; INTERESTING-LABEL: define void @f(ptr %a) {
+define void @f(ptr %a) {
+ %1 = load ptr, ptr %a
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/reduce-operands.ll b/llvm/test/tools/llvm-reduce/reduce-operands.ll
index 4f91285111ef7..e84cfc2e98c5c 100644
--- a/llvm/test/tools/llvm-reduce/reduce-operands.ll
+++ b/llvm/test/tools/llvm-reduce/reduce-operands.ll
@@ -19,7 +19,7 @@
declare void @llvm.foo(metadata)
; CHECK-LABEL: define i32 @main
-define i32 @main(%t* %a, i32 %a2) {
+define i32 @main(ptr %a, i32 %a2) {
; CHECK-LABEL: lb1:
; ONE: inttoptr i16 0
@@ -32,12 +32,12 @@ define i32 @main(%t* %a, i32 %a2) {
; ZERO: inttoptr i16 0
; CHECK: br label %lb2
lb1:
- %b = getelementptr %t, %t* %a, i32 1, i32 0
- %i1 = inttoptr i16 0 to i8*
- %i2 = inttoptr i16 1 to i8*
- %i3 = inttoptr i16 2 to i8*
- %i4 = inttoptr i16 undef to i8*
- call void @llvm.foo(metadata %t* %a)
+ %b = getelementptr %t, ptr %a, i32 1, i32 0
+ %i1 = inttoptr i16 0 to ptr
+ %i2 = inttoptr i16 1 to ptr
+ %i3 = inttoptr i16 2 to ptr
+ %i4 = inttoptr i16 undef to ptr
+ call void @llvm.foo(metadata ptr %a)
br label %lb2
; CHECK-LABEL: lb2:
diff --git a/llvm/test/tools/llvm-reduce/remove-alias.ll b/llvm/test/tools/llvm-reduce/remove-alias.ll
index 8558068366a33..d9ec4f768678b 100644
--- a/llvm/test/tools/llvm-reduce/remove-alias.ll
+++ b/llvm/test/tools/llvm-reduce/remove-alias.ll
@@ -19,20 +19,20 @@
@g1 = global [ 4 x i32 ] zeroinitializer
@g2 = global [ 4 x i32 ] zeroinitializer
-@"$a1" = alias void (), void ()* @fn1
-@"$a2" = alias void (), void ()* @fn2
-@"$a3" = alias void (), void ()* @fn3
-@"$a4" = alias void (), void ()* @fn4
+@"$a1" = alias void (), ptr @fn1
+@"$a2" = alias void (), ptr @fn2
+@"$a3" = alias void (), ptr @fn3
+@"$a4" = alias void (), ptr @fn4
-@"$a5" = alias i64, bitcast (i32* getelementptr ([ 4 x i32 ], [ 4 x i32 ]* @g1, i32 0, i32 1) to i64*)
-@"$a6" = alias i64, bitcast (i32* getelementptr ([ 4 x i32 ], [ 4 x i32 ]* @g2, i32 0, i32 1) to i64*)
+@"$a5" = alias i64, getelementptr ([ 4 x i32 ], ptr @g1, i32 0, i32 1)
+@"$a6" = alias i64, getelementptr ([ 4 x i32 ], ptr @g2, i32 0, i32 1)
- at llvm.used = appending global [1 x i8*] [
- i8* bitcast (i64* @"$a5" to i8*)
+ at llvm.used = appending global [1 x ptr] [
+ ptr @"$a5"
], section "llvm.metadata"
- at llvm.compiler.used = appending global [1 x i8*] [
- i8* bitcast (i64* @"$a6" to i8*)
+ at llvm.compiler.used = appending global [1 x ptr] [
+ ptr @"$a6"
], section "llvm.metadata"
define void @fn1() {
diff --git a/llvm/test/tools/llvm-reduce/remove-args-2.ll b/llvm/test/tools/llvm-reduce/remove-args-2.ll
index f93d9e809a1ec..ee22ccec1eb70 100644
--- a/llvm/test/tools/llvm-reduce/remove-args-2.ll
+++ b/llvm/test/tools/llvm-reduce/remove-args-2.ll
@@ -4,20 +4,20 @@
; RUN: llvm-reduce --delta-passes=arguments --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s --input-file %t
-%struct.foo = type { %struct.foo*, i32, i32, i8* }
+%struct.foo = type { ptr, i32, i32, ptr }
define dso_local void @bar() {
entry:
; CHECK-INTERESTINGNESS: call void @interesting(
- ; CHECK-FINAL: call void @interesting(%struct.foo* null)
- call void @interesting(i32 0, i8* null, %struct.foo* null, i8* null, i64 0)
+ ; CHECK-FINAL: call void @interesting(ptr null)
+ call void @interesting(i32 0, ptr null, ptr null, ptr null, i64 0)
ret void
}
; CHECK-ALL: define internal void @interesting
; CHECK-INTERESTINGNESS-SAME: ({{.*}}%interesting{{.*}}) {
-; CHECK-FINAL-SAME: (%struct.foo* %interesting) {
-define internal void @interesting(i32 %uninteresting1, i8* %uninteresting2, %struct.foo* %interesting, i8* %uninteresting3, i64 %uninteresting4) {
+; CHECK-FINAL-SAME: (ptr %interesting) {
+define internal void @interesting(i32 %uninteresting1, ptr %uninteresting2, ptr %interesting, ptr %uninteresting3, i64 %uninteresting4) {
entry:
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll b/llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll
index 1773397865b72..9716f075e2408 100644
--- a/llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll
+++ b/llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll
@@ -4,20 +4,20 @@
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s --input-file %t
-declare void @pass(void (i32, i8*, i64*)*)
+declare void @pass(ptr)
define void @bar() {
entry:
; CHECK-INTERESTINGNESS: call void @pass({{.*}}@interesting
- ; CHECK-FINAL: call void @pass(void (i32, i8*, i64*)* bitcast (void (i64*)* @interesting to void (i32, i8*, i64*)*))
- call void @pass(void (i32, i8*, i64*)* @interesting)
+ ; CHECK-FINAL: call void @pass(ptr @interesting)
+ call void @pass(ptr @interesting)
ret void
}
; CHECK-ALL: define internal void @interesting
; CHECK-INTERESTINGNESS-SAME: ({{.*}}%interesting{{.*}}) {
-; CHECK-FINAL-SAME: (i64* %interesting)
-define internal void @interesting(i32 %uninteresting1, i8* %uninteresting2, i64* %interesting) {
+; CHECK-FINAL-SAME: (ptr %interesting)
+define internal void @interesting(i32 %uninteresting1, ptr %uninteresting2, ptr %interesting) {
entry:
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs-unwinded-to.ll b/llvm/test/tools/llvm-reduce/remove-bbs-unwinded-to.ll
index 2d3599a82f69c..228ac092b7aca 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs-unwinded-to.ll
+++ b/llvm/test/tools/llvm-reduce/remove-bbs-unwinded-to.ll
@@ -9,7 +9,7 @@ declare void @did_not_throw(i32)
declare void @thrown()
; CHECK-ALL: define void @caller()
-define void @caller() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define void @caller() personality ptr @__gxx_personality_v0 {
; CHECK-ALL: bb:
bb:
; CHECK-INTERESTINGNESS: label %bb3
@@ -18,7 +18,7 @@ bb:
to label %bb3 unwind label %bb1
bb1:
- landingpad { i8*, i32 } catch i8* null
+ landingpad { ptr, i32 } catch ptr null
call void @thrown()
br label %bb4
diff --git a/llvm/test/tools/llvm-reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll b/llvm/test/tools/llvm-reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll
index f2fec66e227b2..68052f25dbca0 100644
--- a/llvm/test/tools/llvm-reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll
+++ b/llvm/test/tools/llvm-reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll
@@ -6,9 +6,9 @@
define void @func(i1 %arg) {
; CHECK-ALL: entry:
; CHECK-INTERESTINGNESS: call void @foo({{.*}}blockaddress
-; CHECK-FINAL: call void @foo(i8* blockaddress(@func, %bb5))
+; CHECK-FINAL: call void @foo(ptr blockaddress(@func, %bb5))
entry:
- call void @foo(i8* blockaddress(@func, %bb5))
+ call void @foo(ptr blockaddress(@func, %bb5))
ret void
; CHECK-ALL: bb5:
@@ -17,4 +17,4 @@ bb5:
ret void
}
-declare void @foo(i8*)
+declare void @foo(ptr)
diff --git a/llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll b/llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll
index 0832456b6bf0d..f09160a05201e 100644
--- a/llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll
+++ b/llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll
@@ -5,9 +5,9 @@
; (Aliasee should be either GlobalValue or ConstantExpr).
; CHECK-INTERESTINGNESS: @alias =
-; CHECK-FINAL: @alias = alias void (i32), bitcast (void ()* @func to void (i32)*)
+; CHECK-FINAL: @alias = alias void (i32), ptr @func
- at alias = alias void (i32), void (i32)* @func
+ at alias = alias void (i32), ptr @func
; CHECK-FINAL: @func()
diff --git a/llvm/test/tools/llvm-reduce/remove-global-vars.ll b/llvm/test/tools/llvm-reduce/remove-global-vars.ll
index 84d24fced2d49..e8310ed58d883 100644
--- a/llvm/test/tools/llvm-reduce/remove-global-vars.ll
+++ b/llvm/test/tools/llvm-reduce/remove-global-vars.ll
@@ -28,29 +28,29 @@ $interesting5 = comdat any
define i32 @main() {
entry:
- %0 = load i32, i32* @uninteresting, align 4
+ %0 = load i32, ptr @uninteresting, align 4
- ; CHECK-INTERESTINGNESS: store i32 {{.*}}, i32* @interesting, align 4
- ; CHECK-FINAL: store i32 0, i32* @interesting, align 4
- store i32 %0, i32* @interesting, align 4
+ ; CHECK-INTERESTINGNESS: store i32 {{.*}}, ptr @interesting, align 4
+ ; CHECK-FINAL: store i32 0, ptr @interesting, align 4
+ store i32 %0, ptr @interesting, align 4
- ; CHECK-INTERESTINGNESS: store i32 {{.*}}, i32* @interesting3, align 4
- ; CHECK-FINAL: store i32 0, i32* @interesting3, align 4
- store i32 %0, i32* @interesting3, align 4
+ ; CHECK-INTERESTINGNESS: store i32 {{.*}}, ptr @interesting3, align 4
+ ; CHECK-FINAL: store i32 0, ptr @interesting3, align 4
+ store i32 %0, ptr @interesting3, align 4
- ; CHECK-ALL: load i32, i32* @interesting, align 4
- %1 = load i32, i32* @interesting, align 4
- store i32 %1, i32* @uninteresting, align 4
+ ; CHECK-ALL: load i32, ptr @interesting, align 4
+ %1 = load i32, ptr @interesting, align 4
+ store i32 %1, ptr @uninteresting, align 4
- ; CHECK-ALL: load i32, i32* @interesting3, align 4
- %2 = load i32, i32* @interesting3, align 4
- store i32 %2, i32* @uninteresting2, align 4
+ ; CHECK-ALL: load i32, ptr @interesting3, align 4
+ %2 = load i32, ptr @interesting3, align 4
+ store i32 %2, ptr @uninteresting2, align 4
- ; CHECK-ALL: store i32 5, i32* @interesting, align 4
- store i32 5, i32* @interesting, align 4
+ ; CHECK-ALL: store i32 5, ptr @interesting, align 4
+ store i32 5, ptr @interesting, align 4
- ; CHECK-ALL: store i32 5, i32* @interesting3, align 4
- store i32 5, i32* @interesting3, align 4
+ ; CHECK-ALL: store i32 5, ptr @interesting3, align 4
+ store i32 5, ptr @interesting3, align 4
ret i32 0
}
diff --git a/llvm/test/tools/llvm-reduce/remove-instructions.ll b/llvm/test/tools/llvm-reduce/remove-instructions.ll
index 5a113e307a127..60bb2c4881748 100644
--- a/llvm/test/tools/llvm-reduce/remove-instructions.ll
+++ b/llvm/test/tools/llvm-reduce/remove-instructions.ll
@@ -15,12 +15,12 @@ entry:
%uninteresting1 = alloca i32, align 4
%interesting = alloca i32, align 4
%uninteresting2 = alloca i32, align 4
- store i32 0, i32* %uninteresting1, align 4
- store i32 0, i32* %interesting, align 4
- %0 = load i32, i32* %interesting, align 4
+ store i32 0, ptr %uninteresting1, align 4
+ store i32 0, ptr %interesting, align 4
+ %0 = load i32, ptr %interesting, align 4
%uninteresting3 = add nsw i32 %0, 1
- store i32 %uninteresting3, i32* %interesting, align 4
- %1 = load i32, i32* %interesting, align 4
- store i32 %1, i32* %uninteresting2, align 4
+ store i32 %uninteresting3, ptr %interesting, align 4
+ %1 = load i32, ptr %interesting, align 4
+ store i32 %1, ptr %uninteresting2, align 4
ret i32 0
}
diff --git a/llvm/test/tools/llvm-reduce/remove-invoked-functions.ll b/llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
index d8ec798fae9a1..023d4cfbe7b18 100644
--- a/llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
+++ b/llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
@@ -19,23 +19,23 @@ declare void @thrown()
; CHECK-INTERESTINGNESS: define void @caller(
; CHECK-FINAL: define void @caller()
-define void @caller(i32 %arg) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define void @caller(i32 %arg) personality ptr @__gxx_personality_v0 {
; CHECK-ALL: bb:
bb:
; CHECK-INTERESTINGNESS: %i0 = invoke i32 {{.*}}@maybe_throwing_callee
-; CHECK-FINAL: %i0 = invoke i32 bitcast (i32 ()* @maybe_throwing_callee to i32 (i32)*)
+; CHECK-FINAL: %i0 = invoke i32 @maybe_throwing_callee
; CHECK-ALL: to label %bb3 unwind label %bb1
%i0 = invoke i32 @maybe_throwing_callee(i32 %arg)
to label %bb3 unwind label %bb1
; CHECK-ALL: bb1:
bb1:
-; CHECK-ALL: landingpad { i8*, i32 }
-; CHECK-ALL: catch i8* null
+; CHECK-ALL: landingpad { ptr, i32 }
+; CHECK-ALL: catch ptr null
; CHECK-ALL: call void @thrown()
; CHECK-ALL: br label %bb4
- landingpad { i8*, i32 }
- catch i8* null
+ landingpad { ptr, i32 }
+ catch ptr null
call void @thrown()
br label %bb4
diff --git a/llvm/test/tools/llvm-reduce/remove-metadata-args.ll b/llvm/test/tools/llvm-reduce/remove-metadata-args.ll
index 817f1eb8defe0..be0d67d3ebe26 100644
--- a/llvm/test/tools/llvm-reduce/remove-metadata-args.ll
+++ b/llvm/test/tools/llvm-reduce/remove-metadata-args.ll
@@ -4,7 +4,7 @@
; All exciting stuff must remain in the reduced file.
; EXCITING-DAG: ExcitingGlobal = global i32 0, !md !0
; EXCITING-DAG: define void @ExcitingFunc() !md !0
-; EXCITING-DAG: store i32 0, i32* @ExcitingGlobal, align 4, !md !0
+; EXCITING-DAG: store i32 0, ptr @ExcitingGlobal, align 4, !md !0
; EXCITING-DAG: !ExcitingNamedMD = !{!0}
; Boring stuff's metadata must have been removed.
@@ -16,8 +16,8 @@
@BoringGlobal = global i32 0, !md !0
define void @ExcitingFunc() !md !0 {
- store i32 0, i32* @ExcitingGlobal, align 4, !md !0
- store i32 0, i32* @BoringGlobal, align 4, !md !0
+ store i32 0, ptr @ExcitingGlobal, align 4, !md !0
+ store i32 0, ptr @BoringGlobal, align 4, !md !0
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll b/llvm/test/tools/llvm-reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll
index ba73a68f0de98..4da2b6d3e8dd9 100644
--- a/llvm/test/tools/llvm-reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll
+++ b/llvm/test/tools/llvm-reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll
@@ -10,14 +10,14 @@
@uninteresting2 = global i32 0, align 4
@uninteresting3 = global i32 0, align 4
-declare void @use(i32*, i32*, i32*)
+declare void @use(ptr, ptr, ptr)
; CHECK-LABEL: @interesting()
define void @interesting() {
entry:
- ; CHECK-ALL: call void @use(i32* @uninteresting1, i32* @uninteresting2, i32* @uninteresting3)
- call void @use(i32* @uninteresting1, i32* @uninteresting2, i32* @uninteresting3)
- call void @use(i32* @uninteresting1, i32* @uninteresting2, i32* @uninteresting3)
- call void @use(i32* @uninteresting1, i32* @uninteresting2, i32* @uninteresting3)
+ ; CHECK-ALL: call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
+ call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
+ call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
+ call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
ret void
}
diff --git a/llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll b/llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll
index 98cbc56739183..6fbdbde907d60 100644
--- a/llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll
+++ b/llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll
@@ -19,9 +19,9 @@ entry:
call void @callee()
ret void
}
-define i8* @f() {
- ; CHECK-ALL: ret i8* @g.{{([0-9a-f]{32})}}
- ret i8* @g
+define ptr @f() {
+ ; CHECK-ALL: ret ptr @g.{{([0-9a-f]{32})}}
+ ret ptr @g
}
!0 = !{i32 0, !"typeid"}
More information about the llvm-commits
mailing list