[Mlir-commits] [mlir] [MLIR] Add canonicalizations to all eligible `index` binary ops (PR #114000)
weiwei chen
llvmlistbot at llvm.org
Tue Oct 29 08:38:02 PDT 2024
================
@@ -65,6 +65,19 @@ func.func @mul() -> index {
return %2 : index
}
+// CHECK-LABEL: @mul_fold_constants
+func.func @mul_fold_constants(%arg: index) -> (index) {
+ %0 = index.constant 2
+ %1 = index.constant 3
+ %2 = index.mul %arg, %0
+ %3 = index.mul %2, %1
+
+ // CHECK-DAG: [[C6:%.*]] = index.constant 6
----------------
weiweichen wrote:
The SSA here probably don't need `CHECK-DAG`, `CHECK` should be good enough. Please fix the bad reference - my original test - you might be using for here too, thank you!)
https://github.com/llvm/llvm-project/pull/114000
More information about the Mlir-commits
mailing list