diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-26 11:16:17 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-26 11:16:17 +0000 |
commit | 9148c5d5495a25e8479f6a58e57f7058da1b4871 (patch) | |
tree | e2e727a241af38d07539999664fb5cbfbec089a2 /lib | |
parent | fb5e6804f3aca40c78d88d6810ad22853816ae06 (diff) | |
download | external_llvm-9148c5d5495a25e8479f6a58e57f7058da1b4871.zip external_llvm-9148c5d5495a25e8479f6a58e57f7058da1b4871.tar.gz external_llvm-9148c5d5495a25e8479f6a58e57f7058da1b4871.tar.bz2 |
Merging r195343:
------------------------------------------------------------------------
r195343 | dsanders | 2013-11-21 03:40:14 -0800 (Thu, 21 Nov 2013) | 5 lines
[mips][msa/dsp] Only do DSP combines if DSP is enabled.
Fixes a crash (null pointer dereferenced) when MSA is enabled.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Mips/MipsSEISelLowering.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsSEISelLowering.cpp b/lib/Target/Mips/MipsSEISelLowering.cpp index eb9656a..274cdc1 100644 --- a/lib/Target/Mips/MipsSEISelLowering.cpp +++ b/lib/Target/Mips/MipsSEISelLowering.cpp @@ -751,6 +751,9 @@ static SDValue performDSPShiftCombine(unsigned Opc, SDNode *N, EVT Ty, unsigned EltSize = Ty.getVectorElementType().getSizeInBits(); BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(N->getOperand(1)); + if (!Subtarget->hasDSP()) + return SDValue(); + if (!BV || !BV->isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs, EltSize, !Subtarget->isLittle()) || |