[Mlir-commits] [mlir] [mlir][arith] Overflow flags propagation in arith canonicalizations. (PR #91646)
    Ivan Butygin 
    llvmlistbot at llvm.org
       
    Sat May 11 04:44:20 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:
Here is better script https://gist.github.com/Hardcode84/bbf08e0923d4b9004aa831d0a1d3ac4f
output https://alive2.llvm.org/ce/z/KhQs4J
https://github.com/llvm/llvm-project/pull/91646
    
    
More information about the Mlir-commits
mailing list