diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Mips/MipsSEISelLowering.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp b/llvm/lib/Target/Mips/MipsSEISelLowering.cpp index 27d7515c40c..c02c235eb7d 100644 --- a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsSEISelLowering.cpp @@ -2210,7 +2210,9 @@ SDValue MipsSETargetLowering::lowerBUILD_VECTOR(SDValue Op, return SDValue(); // If the value fits into a simm10 then we can use ldi.[bhwd] - if (SplatValue.isSignedIntN(10)) + // However, if it isn't an integer type we will have to bitcast from an + // integer type first. + if (ResTy.isInteger() && SplatValue.isSignedIntN(10)) return Op; EVT ViaVecTy; |