summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitfd8e416879bd204c6c0d52efb4b04d3ac1213632 (patch)
tree76dab6a56c95779b699c1ee1e6e3e6519572071d /llvm/lib
parent32474d622605ec7ed3fcf6d53b8317949ed98964 (diff)
downloadbcm5719-llvm-fd8e416879bd204c6c0d52efb4b04d3ac1213632.tar.gz
bcm5719-llvm-fd8e416879bd204c6c0d52efb4b04d3ac1213632.zip
[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. llvm-svn: 195444
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Mips/MipsSEISelLowering.cpp4
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;
OpenPOWER on IntegriCloud