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

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 13:50:40 PDT 2019


nickdesaulniers 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!");
----------------
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!


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