[Mlir-commits] [mlir] [MLIR][DRR] Fix inconsistent operand and arg index usage (PR #139816)

Mehdi Amini llvmlistbot at llvm.org
Sun May 18 00:49:30 PDT 2025


================
@@ -1883,6 +1888,9 @@ def : Pat<(TestEitherOpA (either (TestEitherOpB I32:$arg1, $_),
                           $x),
           (TestEitherOpB $arg2, $x)>;
 
+def : Pat<(TestEitherOpC ConstantAttr<I32Attr, "0">, (either $arg1, I32:$arg2)),
+          (TestEitherOpB $arg1, $arg2)>;
+
----------------
joker-eph wrote:

Can we add a test for this rewrite though to ensure it works as expected?

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


More information about the Mlir-commits mailing list