Add an additional combine to combineCarryThroughADD to reverse it back to the C flag.
I believe this catches the cases that D57547 got.
Paths
| Differential D57637
[X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a constant 1 to encourage INC formation. ClosedPublic Authored by craig.topper on Feb 1 2019, 11:44 PM.
Details Summary Add an additional combine to combineCarryThroughADD to reverse it back to the C flag. I believe this catches the cases that D57547 got.
Diff Detail
Event TimelineComment Actions LGTM. Just checking if I'm seeing this correctly: the 2 changes are independent and have their own shares of the test diffs? This revision is now accepted and ready to land.Feb 2 2019, 4:26 PM Comment Actions The combineCarryThroughADD prevents some regressions from the getX86XALUOOp change. But I think it picked up a change to at least codegen-prepare-uaddo.ll by itself. I can commit the combineCarryThroughADD separately first if you want. Comment Actions
No need to intro regressions - I noticed regressions to the alternate proposal in D57547 when I extended that to handle COND_B --> COND_E, so I was just wondering if this was avoiding that. Might be a potential follow-up for a USUBO / dec sibling to this? Not sure if we have as much test coverage for those. Closed by commit rL352984: [X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a… (authored by ctopper). · Explain WhyFeb 2 2019, 11:25 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 184933 llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/codegen-prepare-uaddo.ll
llvm/trunk/test/CodeGen/X86/combine-add-usat.ll
llvm/trunk/test/CodeGen/X86/scheduler-backtracking.ll
llvm/trunk/test/CodeGen/X86/slow-incdec.ll
llvm/trunk/test/CodeGen/X86/xaluo.ll
|