summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsSEISelLowering.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2013-11-22 11:24:50 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2013-11-22 11:24:50 +0000
commit8dc7f94f4db4cdf2cb6566490908440a58dac19a (patch)
tree1893ddc10aaa27ea06aa326882bd806cc637f003 /lib/Target/Mips/MipsSEISelLowering.cpp
parenta7e8d6581f93151291a8365a32cb9b55587764da (diff)
downloadllvm-8dc7f94f4db4cdf2cb6566490908440a58dac19a.tar.gz
llvm-8dc7f94f4db4cdf2cb6566490908440a58dac19a.tar.bz2
llvm-8dc7f94f4db4cdf2cb6566490908440a58dac19a.tar.xz
[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the appropriate integer vector type.
Fixes an instruction selection failure detected by llvm-stress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSEISelLowering.cpp')
-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;