[PATCH] D44586: [AArch64] Skip an unnecessary getCopyToReg in DYNAMIC_STACKALLOC

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 17 13:13:53 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL327779: [AArch64] Skip an unnecessary getCopyToReg in DYNAMIC_STACKALLOC (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44586?vs=138772&id=138822#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D44586

Files:
  llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp


Index: llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -7527,13 +7527,10 @@
   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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44586.138822.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180317/de5a24ee/attachment.bin>


More information about the llvm-commits mailing list