[llvm] r321132 - [X86] Remove code from combineSext that looks for MVT::i1 after operation legalization which can never happen.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 17:00:01 PST 2017
Author: ctopper
Date: Tue Dec 19 17:00:01 2017
New Revision: 321132
URL: http://llvm.org/viewvc/llvm-project?rev=321132&view=rev
Log:
[X86] Remove code from combineSext that looks for MVT::i1 after operation legalization which can never happen.
Type legalization guarantees this to be impossible since MVT::i1 isn't a legal type.
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=321132&r1=321131&r2=321132&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Dec 19 17:00:01 2017
@@ -35848,14 +35848,8 @@ static SDValue combineSext(SDNode *N, Se
if (SDValue NewCMov = combineToExtendCMOV(N, DAG))
return NewCMov;
- if (!DCI.isBeforeLegalizeOps()) {
- if (InVT == MVT::i1) {
- SDValue Zero = DAG.getConstant(0, DL, VT);
- SDValue AllOnes = DAG.getAllOnesConstant(DL, VT);
- return DAG.getSelect(DL, VT, N0, AllOnes, Zero);
- }
+ if (!DCI.isBeforeLegalizeOps())
return SDValue();
- }
if (InVT == MVT::i1 && N0.getOpcode() == ISD::XOR &&
isAllOnesConstant(N0.getOperand(1)) && N0.hasOneUse()) {
More information about the llvm-commits
mailing list