[X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a constant...
authorCraig Topper <craig.topper@intel.com>
Sun, 3 Feb 2019 07:25:06 +0000 (07:25 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 3 Feb 2019 07:25:06 +0000 (07:25 +0000)
commit950ca192f6f606beb44dcbb0b9f203eed69dadcb
tree8dd6b09acec803797a80f539cae7b552f9fcc35a
parent365e164fcc48ad72deb962937f05efe648c91803
[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
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/codegen-prepare-uaddo.ll
llvm/test/CodeGen/X86/combine-add-usat.ll
llvm/test/CodeGen/X86/scheduler-backtracking.ll
llvm/test/CodeGen/X86/slow-incdec.ll
llvm/test/CodeGen/X86/xaluo.ll