]> granicus.if.org Git - llvm/commit
[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)
commit3aa994cf81d6c573612a06abe322530e3754c482
treed43e94e0de125d84ed433f733bd7476eba1e96a5
parent03c3e57bc206b9616cc8b813ff94d20cc1340902
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352288 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/combine-sbb.ll