[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

Jian Cai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 15:21:43 PDT 2019


jcai19 marked an inline comment as done.
jcai19 added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1922
+      const bool Thumb = Opcode == ARM::tBL_PUSHLR;
+      MachineOperand ReturnAddr = MI.getOperand(0);
+      assert(ReturnAddr.getReg() == ARM::LR && "expect LR register!");
----------------
nickdesaulniers wrote:
> This could be `Register ReturnReg = MI.getOperand(0).getReg();` then the below cleaned up. DRY
> 
> (and a few more opportunities in the return values of `ARMTargetLowering::LowerINTRINSIC_VOID`)
> 
> With that change, LGTM, and thank you for the patch!
Thank you for all the comments! I have made changes accordingly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65019





More information about the cfe-commits mailing list