[PATCH] D124707: [AArch64] Make sure XRay pseudo-instruction sizes are reported correctly

duk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 17:44:23 PDT 2022


duck-37 created this revision.
Herald added subscribers: hiraditya, kristof.beyls, dberris.
Herald added a project: All.
duck-37 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`AArch64InstrInfo::getInstSizeInBytes` does not take XRay instrumentation opcodes into account.
The default case of this function unconditionally returns 4, except for size definitions specified by TableGen.
However, on AArch64, the XRay pseudo-instructions expand to 32 bytes.
Since the XRay pseudo-opcodes are target-independent, the TableGen path doesn't get hit and therefore the size returned is wrong.

Fixes https://github.com/llvm/llvm-project/issues/52712


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124707

Files:
  llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
  llvm/test/CodeGen/AArch64/xray-jump-table-compression.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124707.426199.patch
Type: text/x-patch
Size: 4694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220430/b5fb764d/attachment.bin>


More information about the llvm-commits mailing list