summaryrefslogtreecommitdiff
path: root/lib/Target/Mips
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsSEISelLowering.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsSEISelLowering.cpp b/lib/Target/Mips/MipsSEISelLowering.cpp
index 27d7515c40..c02c235eb7 100644
--- a/lib/Target/Mips/MipsSEISelLowering.cpp
+++ b/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;