diff options
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/sub.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/sub.ll b/llvm/test/Transforms/InstCombine/sub.ll index 95a61b1747c..0e421f75f13 100644 --- a/llvm/test/Transforms/InstCombine/sub.ll +++ b/llvm/test/Transforms/InstCombine/sub.ll @@ -540,3 +540,13 @@ define i32 @test45(i32 %x, i32 %y) { ; CHECK-NEXT: %sub = and i32 %x, %y ; CHECK: ret i32 %sub } + +define i32 @test46(i32 %x, i32 %y) { + %or = or i32 %x, %y + %sub = sub i32 %or, %x + ret i32 %sub +; CHECK-LABEL: @test46( +; CHECK-NEXT: %x.not = xor i32 %x, -1 +; CHECK-NEXT: %sub = and i32 %y, %x.not +; CHECK: ret i32 %sub +} |

