[llvm] r343713 - [X86] Add CMOV_VK2/VK4 pseudos and remove lowering code that turned v2i1/v4i1 SELECT into v8i1.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 3 13:28:43 PDT 2018
Author: ctopper
Date: Wed Oct 3 13:28:43 2018
New Revision: 343713
URL: http://llvm.org/viewvc/llvm-project?rev=343713&view=rev
Log:
[X86] Add CMOV_VK2/VK4 pseudos and remove lowering code that turned v2i1/v4i1 SELECT into v8i1.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86InstrCompiler.td
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=343713&r1=343712&r2=343713&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Oct 3 13:28:43 2018
@@ -19343,16 +19343,6 @@ SDValue X86TargetLowering::LowerSELECT(S
}
}
- if (VT == MVT::v4i1 || VT == MVT::v2i1) {
- SDValue zeroConst = DAG.getIntPtrConstant(0, DL);
- Op1 = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, MVT::v8i1,
- DAG.getUNDEF(MVT::v8i1), Op1, zeroConst);
- Op2 = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, MVT::v8i1,
- DAG.getUNDEF(MVT::v8i1), Op2, zeroConst);
- SDValue newSelect = DAG.getSelect(DL, MVT::v8i1, Cond, Op1, Op2);
- return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, newSelect, zeroConst);
- }
-
if (Cond.getOpcode() == ISD::SETCC) {
if (SDValue NewCond = LowerSETCC(Cond, DAG)) {
Cond = NewCond;
@@ -27468,6 +27458,8 @@ static bool isCMOVPseudo(MachineInstr &M
case X86::CMOV_VR256:
case X86::CMOV_VR256X:
case X86::CMOV_VR512:
+ case X86::CMOV_VK2:
+ case X86::CMOV_VK4:
case X86::CMOV_VK8:
case X86::CMOV_VK16:
case X86::CMOV_VK32:
@@ -29066,6 +29058,8 @@ X86TargetLowering::EmitInstrWithCustomIn
case X86::CMOV_VR256:
case X86::CMOV_VR256X:
case X86::CMOV_VR512:
+ case X86::CMOV_VK2:
+ case X86::CMOV_VK4:
case X86::CMOV_VK8:
case X86::CMOV_VK16:
case X86::CMOV_VK32:
Modified: llvm/trunk/lib/Target/X86/X86InstrCompiler.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrCompiler.td?rev=343713&r1=343712&r2=343713&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrCompiler.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrCompiler.td Wed Oct 3 13:28:43 2018
@@ -599,6 +599,8 @@ let usesCustomInserter = 1, hasNoSchedul
defm _VR256X : CMOVrr_PSEUDO<VR256X, v4i64>;
}
defm _VR512 : CMOVrr_PSEUDO<VR512, v8i64>;
+ defm _VK2 : CMOVrr_PSEUDO<VK2, v2i1>;
+ defm _VK4 : CMOVrr_PSEUDO<VK4, v4i1>;
defm _VK8 : CMOVrr_PSEUDO<VK8, v8i1>;
defm _VK16 : CMOVrr_PSEUDO<VK16, v16i1>;
defm _VK32 : CMOVrr_PSEUDO<VK32, v32i1>;
More information about the llvm-commits
mailing list