[X86] Fold X86ISD::SBB(ISD::SUB(X,Y),0) -> X86ISD::SBB(X,Y) (PR25858)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 26 Jan 2019 20:13:44 +0000 (20:13 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 26 Jan 2019 20:13:44 +0000 (20:13 +0000)
commitb7a15acd38ec1302639e0fff752e01472620b5b8
treee49d205f04f4db4e815514c4ca15c83c72b02116
parent8fd74ebfc03317feac43f513cb9e7d45e9215d12
[X86] Fold X86ISD::SBB(ISD::SUB(X,Y),0) -> X86ISD::SBB(X,Y) (PR25858)

We often generate X86ISD::SBB(X, 0) for carry flag arithmetic.

I had tried to create test cases for the ADC equivalent (which often uses the same pattern) but haven't managed to find anything yet.

Differential Revision: https://reviews.llvm.org/D57169

llvm-svn: 352288
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-sbb.ll