[llvm] [InstCombine] When -A + B both have nsw flag, set nsw flag. (PR #72127)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 08:01:46 PST 2023


================
@@ -120,6 +120,36 @@ define i32 @test5(i32 %A, i32 %B) {
   ret i32 %D
 }
 
+define i32 @test5_2(i32 %A, i32 %B) {
----------------
nikic wrote:

```suggestion
define i32 @test5_both_nsw(i32 %A, i32 %B) {
```

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


More information about the llvm-commits mailing list