mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Fix the CodeGen/PowerPC/vec_constants.ll regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1a7f6ff272
commit
70fa493613
@ -1959,12 +1959,16 @@ static SDOperand BuildSplatI(int Val, unsigned SplatSize, MVT::ValueType VT,
|
|||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) {
|
||||||
assert(Val >= -16 && Val <= 15 && "vsplti is out of range!");
|
assert(Val >= -16 && Val <= 15 && "vsplti is out of range!");
|
||||||
|
|
||||||
// Force vspltis[hw] -1 to vspltisb -1.
|
|
||||||
if (Val == -1) SplatSize = 1;
|
|
||||||
|
|
||||||
static const MVT::ValueType VTys[] = { // canonical VT to use for each size.
|
static const MVT::ValueType VTys[] = { // canonical VT to use for each size.
|
||||||
MVT::v16i8, MVT::v8i16, MVT::Other, MVT::v4i32
|
MVT::v16i8, MVT::v8i16, MVT::Other, MVT::v4i32
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MVT::ValueType ReqVT = VT != MVT::Other ? VT : VTys[SplatSize-1];
|
||||||
|
|
||||||
|
// Force vspltis[hw] -1 to vspltisb -1 to canonicalize.
|
||||||
|
if (Val == -1)
|
||||||
|
SplatSize = 1;
|
||||||
|
|
||||||
MVT::ValueType CanonicalVT = VTys[SplatSize-1];
|
MVT::ValueType CanonicalVT = VTys[SplatSize-1];
|
||||||
|
|
||||||
// Build a canonical splat for this value.
|
// Build a canonical splat for this value.
|
||||||
@ -1973,8 +1977,7 @@ static SDOperand BuildSplatI(int Val, unsigned SplatSize, MVT::ValueType VT,
|
|||||||
Ops.assign(MVT::getVectorNumElements(CanonicalVT), Elt);
|
Ops.assign(MVT::getVectorNumElements(CanonicalVT), Elt);
|
||||||
SDOperand Res = DAG.getNode(ISD::BUILD_VECTOR, CanonicalVT,
|
SDOperand Res = DAG.getNode(ISD::BUILD_VECTOR, CanonicalVT,
|
||||||
&Ops[0], Ops.size());
|
&Ops[0], Ops.size());
|
||||||
if (VT == MVT::Other) return Res;
|
return DAG.getNode(ISD::BIT_CONVERT, ReqVT, Res);
|
||||||
return DAG.getNode(ISD::BIT_CONVERT, VT, Res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// BuildIntrinsicOp - Return a binary operator intrinsic node with the
|
/// BuildIntrinsicOp - Return a binary operator intrinsic node with the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user