[Mlir-commits] [mlir] [mlir][arith] Overflow flags propagation in arith canonicalizations. (PR #91646)
Ivan Butygin
llvmlistbot at llvm.org
Fri May 10 13:31:02 PDT 2024
================
@@ -1051,6 +1193,17 @@ func.func @addiMuliToSubiLhsI32(%arg0: i32, %arg1: i32) -> i32 {
return %add : i32
}
+// CHECK-LABEL: @addiMuliToSubiLhsI32Ovf
+// CHECK-SAME: (%[[ARG0:.+]]: i32, %[[ARG1:.+]]: i32)
+// CHECK: %[[SUB:.+]] = arith.subi %[[ARG0]], %[[ARG1]] overflow<nsw, nuw> : i32
+// CHECK: return %[[SUB]]
+func.func @addiMuliToSubiLhsI32Ovf(%arg0: i32, %arg1: i32) -> i32 {
----------------
Hardcode84 wrote:
So, I wrote this abomination https://gist.github.com/Hardcode84/13a8c5a45aa0e3849e1ab5d30a56749e
* `-split-input-file ` doesn't work properly and I had to manually remove `// -----` markers
* Had to remove `tensor` mentions from the file as it cannot be translated
* Had to remove i0 tests as they hard-crash `-mlir-to-llvmir`
* Had to manually cleanup duplicated `source_filename` and metadata from result.
And all of this was in vain as alive2 timeout on such big input https://alive2.llvm.org/ce/z/bjvhLR
https://github.com/llvm/llvm-project/pull/91646
More information about the Mlir-commits
mailing list