[llvm] 11c7a75 - [Linker] Convert test to opaque pointers (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 04:03:16 PST 2022


Author: Nikita Popov
Date: 2022-12-14T13:03:08+01:00
New Revision: 11c7a753886ce46de52559929a2e05f036e0b16b

URL: https://github.com/llvm/llvm-project/commit/11c7a753886ce46de52559929a2e05f036e0b16b
DIFF: https://github.com/llvm/llvm-project/commit/11c7a753886ce46de52559929a2e05f036e0b16b.diff

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

To preserve test intent, remove a pointer indirection and use
a GEP instead of bitcast, so the type is still mentioned.

Added: 
    

Modified: 
    llvm/test/Linker/Inputs/pr21374.ll
    llvm/test/Linker/pr21374.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Linker/Inputs/pr21374.ll b/llvm/test/Linker/Inputs/pr21374.ll
index fcddeafc2e729..0b2a3b826c27f 100644
--- a/llvm/test/Linker/Inputs/pr21374.ll
+++ b/llvm/test/Linker/Inputs/pr21374.ll
@@ -1,4 +1,4 @@
-%foo = type { i8* }
-define void @g(%foo* %x) {
+%foo = type { ptr }
+define void @g(%foo %x) {
   ret void
 }

diff  --git a/llvm/test/Linker/pr21374.ll b/llvm/test/Linker/pr21374.ll
index d777971adedb7..d97b71865ae8a 100644
--- a/llvm/test/Linker/pr21374.ll
+++ b/llvm/test/Linker/pr21374.ll
@@ -9,12 +9,12 @@
 
 ; Test that we get the same result with or without lazy loading.
 
-; CHECK: %foo = type { i8* }
-; CHECK-DAG: bitcast i32* null to %foo*
-; CHECK-DAG: define void @g(%foo* %x)
+; CHECK: %foo = type { ptr }
+; CHECK-DAG: getelementptr %foo, ptr null, i64 1
+; CHECK-DAG: define void @g(%foo %x)
 
-%foo = type { i8* }
+%foo = type { ptr }
 define void @f() {
-  bitcast i32* null to %foo*
+  getelementptr %foo, ptr null, i64 1
   ret void
 }


        


More information about the llvm-commits mailing list