[llvm] [ARM][Thumb2] Mark BTI-clearing instructions as scheduling region boundaries (PR #79173)

Victor Campos via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 07:33:49 PST 2024


vhscampos wrote:

> * the test can probably be further simplified by dropping unrelated machine instructions or replacing them with obvious NOPs for readability

I've removed one or two extra instructions. I reckon that what's left is important because it's intrinsic to the prolog/epilog codegen of PAC and BTI, although some of it is not necessary to trigger the bug.

> * AFAIK in their inline LLVM IR modules, some mir-based tests use dummy function definitions as placeholders - not corresponding to the actual machine instructions (probably, some properties of the original functions have to be kept)

Good point. Now all the IR definitions are as dummy as possible.

> * it may be worth adding simple test cases for the other BTI-clearing instructions

Added one test for SG and another for PACBTI.

I removed t2CALL_BTI from the list of scheduling boundaries because it's a pseudo-instruction that is transformed into BL + BTI. The pseudo-inst itself can be moved around with no issues. After the expansion, the restrictions must then be enforced.

https://github.com/llvm/llvm-project/pull/79173


More information about the llvm-commits mailing list