[PATCH] D129932: [AArch64] Use SUBXrx64 for dynamic stack to refer to sp

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 01:53:24 PDT 2022


bcl5980 added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:12250
+  Chain = SP.getValue(1);
+  SP = SDValue(DAG.getMachineNode(AArch64::SUBXrx64, dl, MVT::i64, SP, Size,
+                                  ArithExtImm),
----------------
efriedma wrote:
> Please don't use getMachineNode outside of actual instruction selection (AArch64ISelDAGToDAG).  It sort of works, but it breaks the relationship between the lowering and instruction selection, so it can have confusing effects.  Instead, add an opcode to AArch64ISelLowering.h.  (I know this hasn't been followed consistently in the past, but I'd prefer not to expand the existing usage.)
Thanks for the mention about getMachineNode. I'm trying to use the other way you said before to do this to learn how the selection dag works. I will revert and add a new AArchISD if you think it is better.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129932/new/

https://reviews.llvm.org/D129932



More information about the llvm-commits mailing list