[llvm] r348460 - [X86] Remove some leftover code for handling an i1 setcc type. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 5 23:00:02 PST 2018
Author: ctopper
Date: Wed Dec 5 23:00:02 2018
New Revision: 348460
URL: http://llvm.org/viewvc/llvm-project?rev=348460&view=rev
Log:
[X86] Remove some leftover code for handling an i1 setcc type. NFC
We should only need to handle i8 now.
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=348460&r1=348459&r2=348460&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Dec 5 23:00:02 2018
@@ -40000,11 +40000,8 @@ static SDValue materializeSBB(SDNode *N,
SDValue CF = DAG.getConstant(X86::COND_B, DL, MVT::i8);
SDValue SBB = DAG.getNode(X86ISD::SETCC_CARRY, DL, MVT::i8, CF, EFLAGS);
MVT VT = N->getSimpleValueType(0);
- if (VT == MVT::i8)
- return DAG.getNode(ISD::AND, DL, VT, SBB, DAG.getConstant(1, DL, VT));
-
- assert(VT == MVT::i1 && "Unexpected type for SETCC node");
- return DAG.getNode(ISD::TRUNCATE, DL, MVT::i1, SBB);
+ assert(VT == MVT::i8 && "Unexpected type for SETCC node");
+ return DAG.getNode(ISD::AND, DL, VT, SBB, DAG.getConstant(1, DL, VT));
}
/// If this is an add or subtract where one operand is produced by a cmp+setcc,
More information about the llvm-commits
mailing list