[llvm] 896ca59 - [EntryExitInstrumenter] Convert test to opaque pointers (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 08:25:44 PST 2023


Author: Nikita Popov
Date: 2023-01-06T17:25:30+01:00
New Revision: 896ca595f9bb582365ce68e9d3259126b60d4d49

URL: https://github.com/llvm/llvm-project/commit/896ca595f9bb582365ce68e9d3259126b60d4d49
DIFF: https://github.com/llvm/llvm-project/commit/896ca595f9bb582365ce68e9d3259126b60d4d49.diff

LOG: [EntryExitInstrumenter] Convert test to opaque pointers (NFC)

Added: 
    

Modified: 
    llvm/test/Transforms/EntryExitInstrumenter/mcount.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/EntryExitInstrumenter/mcount.ll b/llvm/test/Transforms/EntryExitInstrumenter/mcount.ll
index 5aa68b7a64fbd..9be81d96a8a37 100644
--- a/llvm/test/Transforms/EntryExitInstrumenter/mcount.ll
+++ b/llvm/test/Transforms/EntryExitInstrumenter/mcount.ll
@@ -13,10 +13,10 @@ entry:
 ; CHECK-LABEL: define void @leaf_function()
 ; CHECK: entry:
 ; CHECK-NEXT: call void @mcount()
-; CHECK-NEXT: %0 = call i8* @llvm.returnaddress(i32 0)
-; CHECK-NEXT: call void @__cyg_profile_func_enter(i8* bitcast (void ()* @leaf_function to i8*), i8* %0)
-; CHECK-NEXT: %1 = call i8* @llvm.returnaddress(i32 0)
-; CHECK-NEXT: call void @__cyg_profile_func_exit(i8* bitcast (void ()* @leaf_function to i8*), i8* %1)
+; CHECK-NEXT: %0 = call ptr @llvm.returnaddress(i32 0)
+; CHECK-NEXT: call void @__cyg_profile_func_enter(ptr @leaf_function, ptr %0)
+; CHECK-NEXT: %1 = call ptr @llvm.returnaddress(i32 0)
+; CHECK-NEXT: call void @__cyg_profile_func_exit(ptr @leaf_function, ptr %1)
 ; CHECK-NEXT: ret void
 }
 
@@ -30,17 +30,17 @@ entry:
 ; CHECK: entry:
 ; CHECK-NEXT: call void @mcount()
 
-; CHECK-NEXT: %0 = call i8* @llvm.returnaddress(i32 0)
-; CHECK-NEXT: call void @__cyg_profile_func_enter(i8* bitcast (void ()* @root_function to i8*), i8* %0)
+; CHECK-NEXT: %0 = call ptr @llvm.returnaddress(i32 0)
+; CHECK-NEXT: call void @__cyg_profile_func_enter(ptr @root_function, ptr %0)
 
 ; Entry and exit calls, inlined from @leaf_function()
-; CHECK-NEXT: %1 = call i8* @llvm.returnaddress(i32 0)
-; CHECK-NEXT: call void @__cyg_profile_func_enter(i8* bitcast (void ()* @leaf_function to i8*), i8* %1)
-; CHECK-NEXT: %2 = call i8* @llvm.returnaddress(i32 0)
-; CHECK-NEXT: call void @__cyg_profile_func_exit(i8* bitcast (void ()* @leaf_function to i8*), i8* %2)
-; CHECK-NEXT: %3 = call i8* @llvm.returnaddress(i32 0)
+; CHECK-NEXT: %1 = call ptr @llvm.returnaddress(i32 0)
+; CHECK-NEXT: call void @__cyg_profile_func_enter(ptr @leaf_function, ptr %1)
+; CHECK-NEXT: %2 = call ptr @llvm.returnaddress(i32 0)
+; CHECK-NEXT: call void @__cyg_profile_func_exit(ptr @leaf_function, ptr %2)
+; CHECK-NEXT: %3 = call ptr @llvm.returnaddress(i32 0)
 
-; CHECK-NEXT: call void @__cyg_profile_func_exit(i8* bitcast (void ()* @root_function to i8*), i8* %3)
+; CHECK-NEXT: call void @__cyg_profile_func_exit(ptr @root_function, ptr %3)
 ; CHECK-NEXT: ret void
 }
 
@@ -79,22 +79,22 @@ define void @f7() #7 { entry: ret void }
 
 ; Treat musttail calls as terminators; inserting between the musttail call and
 ; ret is not allowed.
-declare i32* @tailcallee()
-define i32* @tailcaller() #8 {
-  %1 = musttail call i32* @tailcallee()
-  ret i32* %1
-; CHECK-LABEL: define i32* @tailcaller
+declare ptr @tailcallee()
+define ptr @tailcaller() #8 {
+  %1 = musttail call ptr @tailcallee()
+  ret ptr %1
+; CHECK-LABEL: define ptr @tailcaller
 ; CHECK: call void @__cyg_profile_func_exit
-; CHECK: musttail call i32* @tailcallee
+; CHECK: musttail call ptr @tailcallee
 ; CHECK: ret
 }
-define i8* @tailcaller2() #8 {
-  %1 = musttail call i32* @tailcallee()
-  %2 = bitcast i32* %1 to i8*
-  ret i8* %2
-; CHECK-LABEL: define i8* @tailcaller2
+define ptr @tailcaller2() #8 {
+  %1 = musttail call ptr @tailcallee()
+  %2 = bitcast ptr %1 to ptr
+  ret ptr %2
+; CHECK-LABEL: define ptr @tailcaller2
 ; CHECK: call void @__cyg_profile_func_exit
-; CHECK: musttail call i32* @tailcallee
+; CHECK: musttail call ptr @tailcallee
 ; CHECK: bitcast
 ; CHECK: ret
 }


        


More information about the llvm-commits mailing list