diff options
| author | Craig Topper <craig.topper@intel.com> | 2018-01-26 07:30:44 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2018-01-26 07:30:44 +0000 |
| commit | 882f0d7955655334eeb6ae6cd9b91596856cb28c (patch) | |
| tree | 350d9e7d36fd92a6b16b4e490111377eb5ff477e | |
| parent | b5c45e050915d8debd1dc22417b59a4167d0ac56 (diff) | |
| download | bcm5719-llvm-882f0d7955655334eeb6ae6cd9b91596856cb28c.tar.gz bcm5719-llvm-882f0d7955655334eeb6ae6cd9b91596856cb28c.zip | |
[X86] Remove dead code from LowerBUILD_VECTOR that tried to handle i64 element type in 32-bit mode.
Type legalization would prevent any i64 operands to the build_vector from existing before we get here. The coverage bots show this code as uncovered.
llvm-svn: 323506
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index aa7f224875e..a7713834780 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -8073,27 +8073,6 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const { unsigned Idx = countTrailingZeros(NonZeros); SDValue Item = Op.getOperand(Idx); - // If this is an insertion of an i64 value on x86-32, and if the top bits of - // the value are obviously zero, truncate the value to i32 and do the - // insertion that way. Only do this if the value is non-constant or if the - // value is a constant being inserted into element 0. It is cheaper to do - // a constant pool load than it is to do a movd + shuffle. - if (EltVT == MVT::i64 && !Subtarget.is64Bit() && - (!IsAllConstants || Idx == 0)) { - if (DAG.MaskedValueIsZero(Item, APInt::getHighBitsSet(64, 32))) { - // Handle SSE only. - assert(VT == MVT::v2i64 && "Expected an SSE value type!"); - MVT VecVT = MVT::v4i32; - - // Truncate the value (which may itself be a constant) to i32, and - // convert it to a vector with movd (S2V+shuffle to zero extend). - Item = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32, Item); - Item = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VecVT, Item); - return DAG.getBitcast(VT, getShuffleVectorZeroOrUndef( - Item, Idx * 2, true, Subtarget, DAG)); - } - } - // If we have a constant or non-constant insertion into the low element of // a vector, we can do this with SCALAR_TO_VECTOR + shuffle of zero into // the rest of the elements. This will be matched as movd/movq/movss/movsd |

