[llvm] r265447 - [X86] Simplify early-exit check. NFC.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 13:02:23 PDT 2016
Author: ab
Date: Tue Apr 5 15:02:22 2016
New Revision: 265447
URL: http://llvm.org/viewvc/llvm-project?rev=265447&view=rev
Log:
[X86] Simplify early-exit check. NFC.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=265447&r1=265446&r2=265447&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Apr 5 15:02:22 2016
@@ -26150,10 +26150,10 @@ static SDValue combineSelect(SDNode *N,
// where Op could be BRCOND or CMOV.
//
static SDValue checkBoolTestSetCCCombine(SDValue Cmp, X86::CondCode &CC) {
- // Quit if not CMP and SUB with its value result used.
- if (Cmp.getOpcode() != X86ISD::CMP &&
- (Cmp.getOpcode() != X86ISD::SUB || Cmp.getNode()->hasAnyUseOfValue(0)))
- return SDValue();
+ // This combine only operates on CMP-like nodes.
+ if (!(Cmp.getOpcode() == X86ISD::CMP ||
+ (Cmp.getOpcode() == X86ISD::SUB && !Cmp->hasAnyUseOfValue(0))))
+ return SDValue();
// Quit if not used as a boolean value.
if (CC != X86::COND_E && CC != X86::COND_NE)
More information about the llvm-commits
mailing list