summaryrefslogtreecommitdiff
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-26 11:16:52 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-26 11:16:52 +0000
commit876f8f123e9a52bf8e970f9e04b93700380b5dbf (patch)
tree99341579c7ea1e51de0faa8d1482ad271a3c0109 /lib/Target/Mips
parent1184bebd31edac189a2c129ba93795b66cf4876d (diff)
downloadllvm-876f8f123e9a52bf8e970f9e04b93700380b5dbf.tar.gz
llvm-876f8f123e9a52bf8e970f9e04b93700380b5dbf.tar.bz2
llvm-876f8f123e9a52bf8e970f9e04b93700380b5dbf.tar.xz
Merging r195444:
------------------------------------------------------------------------ r195444 | dsanders | 2013-11-22 03:24:50 -0800 (Fri, 22 Nov 2013) | 4 lines [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/branches/release_34@195742 91177308-0d34-0410-b5e6-96231b3b80d8
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;