mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[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/trunk@195343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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()) ||
|
||||
|
Reference in New Issue
Block a user