[llvm] [TLI] Fix replace-with-veclib crash with invalid arguments (PR #77112)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 00:20:23 PST 2024


================
@@ -85,5 +102,7 @@ TEST_F(ReplaceWithVecLibTest, TestInvalidMapping) {
   VecDesc IncorrectVD = {"llvm.powi.f32.i32", "_ZGVsMxvv_powi",
                          ElementCount::getScalable(4), /*Masked*/ true,
                          "_ZGVsMxvv"};
-  EXPECT_TRUE(run(IncorrectVD, IR));
+  EXPECT_EQ(
+      run(IncorrectVD, IR),
+      "replace-with-veclib: Will not replace. Wrong type at index 1: i32");
----------------
mgabka wrote:

nit: the quality of debug messages varies in the llvm, so I didn't point in earlier, but to me this would be m ore helpful if contained the vector intrinsic name.

https://github.com/llvm/llvm-project/pull/77112


More information about the llvm-commits mailing list