mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
LegalizeDAG: Allow type promotion of scalar loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169773 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b7f16e971
commit
f45d11b56b
@ -890,10 +890,9 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
|
||||
break;
|
||||
}
|
||||
case TargetLowering::Promote: {
|
||||
// Only promote a load of vector type to another.
|
||||
assert(VT.isVector() && "Cannot promote this load!");
|
||||
// Change base type to a different vector type.
|
||||
EVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT);
|
||||
assert(NVT.getSizeInBits() == VT.getSizeInBits() &&
|
||||
"Can only promote loads to same size type");
|
||||
|
||||
SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(),
|
||||
LD->isVolatile(), LD->isNonTemporal(),
|
||||
|
Loading…
Reference in New Issue
Block a user