diff options
author | Nikita Popov <npopov@redhat.com> | 2023-01-05 12:11:12 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-01-05 12:11:43 +0100 |
commit | 76376af24be3469e7e07af7b51d5d7526225e1df (patch) | |
tree | 87e4edc797103d866da38eefb55081582c10e84a /llvm | |
parent | 551ec87883c5129d9d2826d89c9d9600d57eebab (diff) | |
download | llvm-76376af24be3469e7e07af7b51d5d7526225e1df.zip llvm-76376af24be3469e7e07af7b51d5d7526225e1df.tar.gz llvm-76376af24be3469e7e07af7b51d5d7526225e1df.tar.bz2 |
[LinkModulesTest] Convert to opaque pointers (NFC)
This requires switching to the ssa.copy intrinsic, otherwise
we don't preserve test intent.
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/unittests/Linker/LinkModulesTest.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/unittests/Linker/LinkModulesTest.cpp b/llvm/unittests/Linker/LinkModulesTest.cpp index 793c744..3964afc 100644 --- a/llvm/unittests/Linker/LinkModulesTest.cpp +++ b/llvm/unittests/Linker/LinkModulesTest.cpp @@ -315,35 +315,35 @@ TEST_F(LinkModuleTest, RemangleIntrinsics) { // type in the signature are properly remangled. const char *FooStr = "%struct.rtx_def = type { i16 }\n" - "define void @foo(%struct.rtx_def* %a, i8 %b, i32 %c) {\n" - " call void @llvm.memset.p0s_struct.rtx_defs.i32(%struct.rtx_def* %a, i8 %b, i32 %c, i32 4, i1 true)\n" + "define void @foo(%struct.rtx_def %a) {\n" + " call %struct.rtx_def @llvm.ssa.copy.s_struct.rtx_defs(%struct.rtx_def %a)\n" " ret void\n" "}\n" - "declare void @llvm.memset.p0s_struct.rtx_defs.i32(%struct.rtx_def*, i8, i32, i32, i1)\n"; + "declare %struct.rtx_def @llvm.ssa.copy.s_struct.rtx_defs(%struct.rtx_def)\n"; const char *BarStr = "%struct.rtx_def = type { i16 }\n" - "define void @bar(%struct.rtx_def* %a, i8 %b, i32 %c) {\n" - " call void @llvm.memset.p0s_struct.rtx_defs.i32(%struct.rtx_def* %a, i8 %b, i32 %c, i32 4, i1 true)\n" + "define void @bar(%struct.rtx_def %a) {\n" + " call %struct.rtx_def @llvm.ssa.copy.s_struct.rtx_defs(%struct.rtx_def %a)\n" " ret void\n" "}\n" - "declare void @llvm.memset.p0s_struct.rtx_defs.i32(%struct.rtx_def*, i8, i32, i32, i1)\n"; + "declare %struct.rtx_def @llvm.ssa.copy.s_struct.rtx_defs(%struct.rtx_def)\n"; std::unique_ptr<Module> Foo = parseAssemblyString(FooStr, Err, C); assert(Foo); ASSERT_TRUE(Foo.get()); // Foo is loaded first, so the type and the intrinsic have theis original // names. - ASSERT_TRUE(Foo->getFunction("llvm.memset.p0s_struct.rtx_defs.i32")); - ASSERT_FALSE(Foo->getFunction("llvm.memset.p0s_struct.rtx_defs.0.i32")); + ASSERT_TRUE(Foo->getFunction("llvm.ssa.copy.s_struct.rtx_defs")); + ASSERT_FALSE(Foo->getFunction("llvm.ssa.copy.s_struct.rtx_defs.0")); std::unique_ptr<Module> Bar = parseAssemblyString(BarStr, Err, C); assert(Bar); ASSERT_TRUE(Bar.get()); // Bar is loaded after Foo, so the type is renamed to struct.rtx_def.0. Check // that the intrinsic is also renamed. - ASSERT_FALSE(Bar->getFunction("llvm.memset.p0s_struct.rtx_defs.i32")); - ASSERT_TRUE(Bar->getFunction("llvm.memset.p0s_struct.rtx_def.0s.i32")); + ASSERT_FALSE(Bar->getFunction("llvm.ssa.copy.s_struct.rtx_defs")); + ASSERT_TRUE(Bar->getFunction("llvm.ssa.copy.s_struct.rtx_def.0s")); // Link two modules together. auto Dst = std::make_unique<Module>("Linked", C); @@ -355,7 +355,7 @@ TEST_F(LinkModuleTest, RemangleIntrinsics) { // "struct.rtx_def" from Foo and "struct.rtx_def.0" from Bar are isomorphic // types, so they must be uniquified by linker. Check that they use the same // intrinsic definition. - Function *F = Foo->getFunction("llvm.memset.p0s_struct.rtx_defs.i32"); + Function *F = Foo->getFunction("llvm.ssa.copy.s_struct.rtx_defs"); ASSERT_EQ(F->getNumUses(), (unsigned)2); } |