[PATCH] D118545: [ARM] Fix 8-bit immediate overflow in the instruction of segmented stack prologue.

Zhiyao Ma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 08:34:59 PST 2022


ZhiyaoMa98 added a comment.

For thumb1, the number of emitted instructions varies with the value of the 32-bit immediate. How should we set the cost for the new pseudo-instruction `tMOVi32imm`? For the existing `t2MOVi32imm`, the cost is set as `IIC_iMOVix2`. I understand it comes from one `movw` and one `movt`. But for variable cost, I am not sure what to do.

I see the logic of expanding `t2MOVi32imm` in `ARMExpandPseudo::ExpandMOV32BitImm`, but I feel hard to understand them fully. Is there any tutorial that focuses on this part?

Thank you for your review and comments, and help.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118545



More information about the llvm-commits mailing list