diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2019-02-20 21:23:04 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2019-02-20 21:23:04 +0000 |
| commit | 198cc305e985accb3ba74f64e38fd5b3146fe6f4 (patch) | |
| tree | 74ed449a1f6500d3f3747747f006fa5f2aeea9e2 /llvm/test/CodeGen/X86 | |
| parent | 48cf37b55cc956df03c61bc41eb54fc4f582fef6 (diff) | |
| download | bcm5719-llvm-198cc305e985accb3ba74f64e38fd5b3146fe6f4.tar.gz bcm5719-llvm-198cc305e985accb3ba74f64e38fd5b3146fe6f4.zip | |
[CGP] match a special-case of unsigned subtract overflow
This is the 'sub0' (negate) pattern from PR31754:
https://bugs.llvm.org/show_bug.cgi?id=31754
llvm-svn: 354519
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/cgp-usubo.ll | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/X86/cgp-usubo.ll b/llvm/test/CodeGen/X86/cgp-usubo.ll index ba804282364..aa0e15b3784 100644 --- a/llvm/test/CodeGen/X86/cgp-usubo.ll +++ b/llvm/test/CodeGen/X86/cgp-usubo.ll @@ -111,11 +111,9 @@ define i1 @usubo_eq_constant1_op1_i32(i32 %x, i32* %p) nounwind { define i1 @usubo_ne_constant0_op1_i32(i32 %x, i32* %p) { ; CHECK-LABEL: usubo_ne_constant0_op1_i32: ; CHECK: # %bb.0: -; CHECK-NEXT: movl %edi, %ecx -; CHECK-NEXT: negl %ecx -; CHECK-NEXT: testl %edi, %edi -; CHECK-NEXT: setne %al -; CHECK-NEXT: movl %ecx, (%rsi) +; CHECK-NEXT: negl %edi +; CHECK-NEXT: setb %al +; CHECK-NEXT: movl %edi, (%rsi) ; CHECK-NEXT: retq %s = sub i32 0, %x %ov = icmp ne i32 %x, 0 |

