[llvm] 048831e - LowerGuardIntrinsic: Convert tests to opaque pointers
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 06:08:48 PST 2022
Author: Matt Arsenault
Date: 2022-11-28T09:08:31-05:00
New Revision: 048831ef74cd80ee0c54362c89cda51a4f9b0050
URL: https://github.com/llvm/llvm-project/commit/048831ef74cd80ee0c54362c89cda51a4f9b0050
DIFF: https://github.com/llvm/llvm-project/commit/048831ef74cd80ee0c54362c89cda51a4f9b0050.diff
LOG: LowerGuardIntrinsic: Convert tests to opaque pointers
Added:
Modified:
llvm/test/Transforms/LowerGuardIntrinsic/basic.ll
llvm/test/Transforms/LowerGuardIntrinsic/with-calling-conv.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LowerGuardIntrinsic/basic.ll b/llvm/test/Transforms/LowerGuardIntrinsic/basic.ll
index 6c1dd95331ab6..2139396f28a70 100644
--- a/llvm/test/Transforms/LowerGuardIntrinsic/basic.ll
+++ b/llvm/test/Transforms/LowerGuardIntrinsic/basic.ll
@@ -3,10 +3,10 @@
declare void @llvm.experimental.guard(i1, ...)
-define i8 @f_basic(i1* %c_ptr) {
+define i8 @f_basic(ptr %c_ptr) {
; CHECK-LABEL: @f_basic(
- %c = load volatile i1, i1* %c_ptr
+ %c = load volatile i1, ptr %c_ptr
call void(i1, ...) @llvm.experimental.guard(i1 %c, i32 1) [ "deopt"(i32 1) ]
ret i8 5
@@ -18,10 +18,10 @@ define i8 @f_basic(i1* %c_ptr) {
; CHECK-NEXT: ret i8 5
}
-define void @f_void_return_ty(i1* %c_ptr) {
+define void @f_void_return_ty(ptr %c_ptr) {
; CHECK-LABEL: @f_void_return_ty(
- %c = load volatile i1, i1* %c_ptr
+ %c = load volatile i1, ptr %c_ptr
call void(i1, ...) @llvm.experimental.guard(i1 %c, i32 1) [ "deopt"() ]
ret void
@@ -33,10 +33,10 @@ define void @f_void_return_ty(i1* %c_ptr) {
; CHECK-NEXT: ret void
}
-define void @f_multiple_args(i1* %c_ptr) {
+define void @f_multiple_args(ptr %c_ptr) {
; CHECK-LABEL: @f_multiple_args(
- %c = load volatile i1, i1* %c_ptr
+ %c = load volatile i1, ptr %c_ptr
call void(i1, ...) @llvm.experimental.guard(i1 %c, i32 1, i32 2, double 500.0) [ "deopt"(i32 2, i32 3) ]
ret void
@@ -48,9 +48,9 @@ define void @f_multiple_args(i1* %c_ptr) {
; CHECK-NEXT: ret void
}
-define i32 @f_zero_args(i1* %c_ptr) {
+define i32 @f_zero_args(ptr %c_ptr) {
; CHECK-LABEL: @f_zero_args(
- %c = load volatile i1, i1* %c_ptr
+ %c = load volatile i1, ptr %c_ptr
call void(i1, ...) @llvm.experimental.guard(i1 %c) [ "deopt"(i32 2, i32 3) ]
ret i32 500
@@ -62,14 +62,14 @@ define i32 @f_zero_args(i1* %c_ptr) {
; CHECK-NEXT: ret i32 500
}
-define i8 @f_with_make_implicit_md(i32* %ptr) {
+define i8 @f_with_make_implicit_md(ptr %ptr) {
; CHECK-LABEL: @f_with_make_implicit_md(
; CHECK: br i1 %notNull, label %guarded, label %deopt, !prof !0, !make.implicit !1
; CHECK: deopt:
; CHECK-NEXT: %deoptcall = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ "deopt"(i32 1) ]
; CHECK-NEXT: ret i8 %deoptcall
- %notNull = icmp ne i32* %ptr, null
+ %notNull = icmp ne ptr %ptr, null
call void(i1, ...) @llvm.experimental.guard(i1 %notNull, i32 1) [ "deopt"(i32 1) ], !make.implicit !{}
ret i8 5
}
diff --git a/llvm/test/Transforms/LowerGuardIntrinsic/with-calling-conv.ll b/llvm/test/Transforms/LowerGuardIntrinsic/with-calling-conv.ll
index 9dce54ce6044d..7b9a2bde08116 100644
--- a/llvm/test/Transforms/LowerGuardIntrinsic/with-calling-conv.ll
+++ b/llvm/test/Transforms/LowerGuardIntrinsic/with-calling-conv.ll
@@ -2,14 +2,14 @@
declare cc99 void @llvm.experimental.guard(i1, ...)
-define i8 @f_basic(i1* %c_ptr) {
+define i8 @f_basic(ptr %c_ptr) {
; CHECK-LABEL: @f_basic(
; CHECK: br i1 %c, label %guarded, label %deopt
; CHECK: deopt:
; CHECK-NEXT: %deoptcall = call cc99 i8 (...) @llvm.experimental.deoptimize.i8() [ "deopt"() ]
; CHECK-NEXT: ret i8 %deoptcall
- %c = load volatile i1, i1* %c_ptr
+ %c = load volatile i1, ptr %c_ptr
call cc99 void(i1, ...) @llvm.experimental.guard(i1 %c) [ "deopt"() ]
ret i8 6
}
More information about the llvm-commits
mailing list