1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Fix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there was

no pattern.

llvm-svn: 142130
This commit is contained in:
Nadav Rotem 2011-10-16 10:02:06 +00:00
parent f249f434e0
commit a733f43137
2 changed files with 9 additions and 3 deletions

View File

@ -1752,9 +1752,11 @@ SPU::LowerV2I64Splat(EVT OpVT, SelectionDAG& DAG, uint64_t SplatVal,
// Both upper and lower are special, lower to a constant pool load:
if (lower_special && upper_special) {
SDValue SplatValCN = DAG.getConstant(SplatVal, MVT::i64);
return DAG.getNode(ISD::BUILD_VECTOR, dl, MVT::v2i64,
SplatValCN, SplatValCN);
SDValue UpperVal = DAG.getConstant(upper, MVT::i32);
SDValue LowerVal = DAG.getConstant(lower, MVT::i32);
SDValue BV = DAG.getNode(ISD::BUILD_VECTOR, dl, MVT::v4i32,
UpperVal, LowerVal, UpperVal, LowerVal);
return DAG.getNode(ISD::BITCAST, dl, OpVT, BV);
}
SDValue LO32;

View File

@ -342,3 +342,7 @@ define <8 x i16> @ashr_v8i16(<8 x i16> %val, <8 x i16> %sh) {
%rv = ashr <8 x i16> %val, %sh
ret <8 x i16> %rv
}
define <2 x i64> @special_const() {
ret <2 x i64> <i64 4294967295, i64 4294967295>
}