[llvm] 5b2a734 - [IRTests] With opaque ptrs we can test that there is no bitcast inserted

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 01:00:38 PDT 2022


Author: Benjamin Kramer
Date: 2022-06-02T09:56:11+02:00
New Revision: 5b2a7348b7e7de1ebfabb6df2cbf98c938172e8b

URL: https://github.com/llvm/llvm-project/commit/5b2a7348b7e7de1ebfabb6df2cbf98c938172e8b
DIFF: https://github.com/llvm/llvm-project/commit/5b2a7348b7e7de1ebfabb6df2cbf98c938172e8b.diff

LOG: [IRTests] With opaque ptrs we can test that there is no bitcast inserted

Added: 
    

Modified: 
    llvm/unittests/IR/ValueTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/IR/ValueTest.cpp b/llvm/unittests/IR/ValueTest.cpp
index 0ab326d519a95..958340645d518 100644
--- a/llvm/unittests/IR/ValueTest.cpp
+++ b/llvm/unittests/IR/ValueTest.cpp
@@ -85,6 +85,7 @@ TEST(GlobalTest, CreateAddressSpace) {
 
   // Make sure the address space isn't dropped when returning this.
   Constant *DummyCast1 = M->getOrInsertGlobal("dummy_cast", Int8Ty);
+  EXPECT_EQ(DummyCast0, DummyCast1);
   EXPECT_EQ(1u, DummyCast1->getType()->getPointerAddressSpace());
 }
 


        


More information about the llvm-commits mailing list