diff options
author | Jim Grosbach <grosbach@apple.com> | 2013-10-23 17:37:40 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2013-10-23 17:37:40 +0000 |
commit | 20b27748335b8c5808c7ebdd7848612f8c522bab (patch) | |
tree | faef282158c42cbac1f47ff04a899f55e4074317 /lib/Target/X86/X86ISelLowering.cpp | |
parent | 8e3851a6eb9fe5fc30094c3a00d2b89c7cd68cbd (diff) | |
download | external_llvm-20b27748335b8c5808c7ebdd7848612f8c522bab.zip external_llvm-20b27748335b8c5808c7ebdd7848612f8c522bab.tar.gz external_llvm-20b27748335b8c5808c7ebdd7848612f8c522bab.tar.bz2 |
X86: Make concat_vectors combine a bit more conservative.
Per Nadav's review comments for r192866.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index e8918f4..7dddb49 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -16188,6 +16188,8 @@ static SDValue PerformConcatCombine(SDNode *N, SelectionDAG &DAG, Op0->getOpcode() == ISD::BITCAST && !TLI.isTypeLegal(Op0->getValueType(0)) && TLI.isTypeLegal(Op0->getOperand(0)->getValueType(0))) { + if (Op0->getOperand(0)->getValueType(0).isVector()) + return SDValue(); SDValue Scalar = Op0->getOperand(0); // Any legal type here will be a simple value type. MVT SVT = Scalar->getValueType(0).getSimpleVT(); @@ -16195,6 +16197,10 @@ static SDValue PerformConcatCombine(SDNode *N, SelectionDAG &DAG, if (SVT == MVT::x86mmx) return SDValue(); EVT NVT = MVT::getVectorVT(SVT, 2); + // If the result vector type isn't legal, this transform won't really + // help, so bail on that, too. + if (!TLI.isTypeLegal(NVT)) + return SDValue(); SDLoc dl = SDLoc(N); SDValue Res = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, NVT, Scalar); Res = DAG.getNode(ISD::BITCAST, dl, VT, Res); |