mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
LegalizeDAG: Allow type promotion for scalar stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169772 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d1d92bf953
commit
8b7f16e971
@ -731,9 +731,10 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
|
||||
return;
|
||||
}
|
||||
case TargetLowering::Promote: {
|
||||
assert(VT.isVector() && "Unknown legal promote case!");
|
||||
Value = DAG.getNode(ISD::BITCAST, dl,
|
||||
TLI.getTypeToPromoteTo(ISD::STORE, VT), Value);
|
||||
EVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT);
|
||||
assert(NVT.getSizeInBits() == VT.getSizeInBits() &&
|
||||
"Can only promote stores to same size type");
|
||||
Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value);
|
||||
SDValue Result =
|
||||
DAG.getStore(Chain, dl, Value, Ptr,
|
||||
ST->getPointerInfo(), isVolatile,
|
||||
|
Loading…
Reference in New Issue
Block a user