mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add sanity checking for BUILD_PAIR (I noticed the
other day that PPC custom lowering could create a BUILD_PAIR of two f64 with a result type of... f64! - already fixed). Fix a place that triggers the sanity check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -390,14 +390,17 @@ static SDValue getCopyFromParts(SelectionDAG &DAG,
|
||||
ValueVT : MVT::getIntegerVT(RoundBits);
|
||||
SDValue Lo, Hi;
|
||||
|
||||
MVT HalfVT = ValueVT.isInteger() ?
|
||||
MVT::getIntegerVT(RoundBits/2) :
|
||||
MVT::getFloatingPointVT(RoundBits/2);
|
||||
|
||||
if (RoundParts > 2) {
|
||||
MVT HalfVT = MVT::getIntegerVT(RoundBits/2);
|
||||
Lo = getCopyFromParts(DAG, Parts, RoundParts/2, PartVT, HalfVT);
|
||||
Hi = getCopyFromParts(DAG, Parts+RoundParts/2, RoundParts/2,
|
||||
PartVT, HalfVT);
|
||||
} else {
|
||||
Lo = Parts[0];
|
||||
Hi = Parts[1];
|
||||
Lo = DAG.getNode(ISD::BIT_CONVERT, HalfVT, Parts[0]);
|
||||
Hi = DAG.getNode(ISD::BIT_CONVERT, HalfVT, Parts[1]);
|
||||
}
|
||||
if (TLI.isBigEndian())
|
||||
std::swap(Lo, Hi);
|
||||
|
Reference in New Issue
Block a user