[llvm] [LLVM][TableGen] Check overloaded intrinsic mangling suffix conflicts (PR #110324)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 12:01:22 PDT 2024
================
@@ -74,15 +74,74 @@ TEST(IntrinsicNameLookup, Basic) {
};
for (const auto &[Name, ExpectedIdx] : Tests) {
- int Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable1, Name);
+ int Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable, Name);
EXPECT_EQ(ExpectedIdx, Idx);
if (!StringRef(Name).starts_with("llvm.foo"))
continue;
- Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable1, Name, "foo");
+ Idx = Intrinsic::lookupLLVMIntrinsicByName(NameTable, Name, "foo");
EXPECT_EQ(ExpectedIdx, Idx);
}
}
+// Test case to demonstrate potential conflicts between overloaded and non-
+// overloaded intrinsics. The name match works by essentially dividing then
+// name into . separated components and doing successive search for each
+// component. When a search fails, the lowest component of the matching
+// range for the previous component is returned.
+TEST(IntrinsicNameLookup, OverloadConflict) {
----------------
nikic wrote:
I'd drop it, but I won't insist if you think it's valuable.
https://github.com/llvm/llvm-project/pull/110324
More information about the llvm-commits
mailing list