diff options
author | Craig Topper <craig.topper@intel.com> | 2019-02-03 07:25:06 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-02-03 07:25:06 +0000 |
commit | 950ca192f6f606beb44dcbb0b9f203eed69dadcb (patch) | |
tree | 8dd6b09acec803797a80f539cae7b552f9fcc35a /llvm/test/CodeGen/X86/combine-add-usat.ll | |
parent | 365e164fcc48ad72deb962937f05efe648c91803 (diff) | |
download | bcm5719-llvm-950ca192f6f606beb44dcbb0b9f203eed69dadcb.tar.gz bcm5719-llvm-950ca192f6f606beb44dcbb0b9f203eed69dadcb.zip |
[X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a constant 1 to encourage INC formation.
Summary:
Add an additional combine to combineCarryThroughADD to reverse it back to the C flag to avoid regressions.
I believe this catches the cases that D57547 got.
Reviewers: RKSimon, spatel
Reviewed By: spatel
Subscribers: javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57637
llvm-svn: 352984
Diffstat (limited to 'llvm/test/CodeGen/X86/combine-add-usat.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/combine-add-usat.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/combine-add-usat.ll b/llvm/test/CodeGen/X86/combine-add-usat.ll index 7565f0624b1..478a4f388f8 100644 --- a/llvm/test/CodeGen/X86/combine-add-usat.ll +++ b/llvm/test/CodeGen/X86/combine-add-usat.ll @@ -77,9 +77,9 @@ define <8 x i16> @combine_constfold_undef_v8i16() { define i32 @combine_constant_i32(i32 %a0) { ; CHECK-LABEL: combine_constant_i32: ; CHECK: # %bb.0: -; CHECK-NEXT: addl $1, %edi +; CHECK-NEXT: incl %edi ; CHECK-NEXT: movl $-1, %eax -; CHECK-NEXT: cmovael %edi, %eax +; CHECK-NEXT: cmovnel %edi, %eax ; CHECK-NEXT: retq %1 = call i32 @llvm.uadd.sat.i32(i32 1, i32 %a0) ret i32 %1 |