mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[AArch64] Skip an unnecessary getCopyToReg in DYNAMIC_STACKALLOC
Differential Revision: https://reviews.llvm.org/D44586 llvm-svn: 327779
This commit is contained in:
parent
c89f3ddc27
commit
bb9cb03ed3
@ -7527,13 +7527,10 @@ AArch64TargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
|
||||
SDValue SP = DAG.getCopyFromReg(Chain, dl, AArch64::SP, MVT::i64);
|
||||
Chain = SP.getValue(1);
|
||||
SP = DAG.getNode(ISD::SUB, dl, MVT::i64, SP, Size);
|
||||
Chain = DAG.getCopyToReg(Chain, dl, AArch64::SP, SP);
|
||||
|
||||
if (Align) {
|
||||
if (Align)
|
||||
SP = DAG.getNode(ISD::AND, dl, VT, SP.getValue(0),
|
||||
DAG.getConstant(-(uint64_t)Align, dl, VT));
|
||||
Chain = DAG.getCopyToReg(Chain, dl, AArch64::SP, SP);
|
||||
}
|
||||
Chain = DAG.getCopyToReg(Chain, dl, AArch64::SP, SP);
|
||||
|
||||
Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true),
|
||||
DAG.getIntPtrConstant(0, dl, true), SDValue(), dl);
|
||||
|
Loading…
Reference in New Issue
Block a user