[PATCH] D157688: [LowerTypeTests,ARM] Support Armv8-M BTI in jump tables.

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 05:16:40 PDT 2023


simon_tatham added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1486
+      // setting to ensure BTI can be assembled.
+      F->addFnAttr("target-features", "+pacbti");
+    } else if (CanUseThumbBWJumpTable) {
----------------
olista01 wrote:
> Does calling `addFnAttr` twice concatenate the value strings, or will this replace the "+thumb-mode" attribute? This should also be added to the test.
Ugh, apparently you're right, it replaces the previous value of `target-features`.

It probably doesn't actually matter at the moment, because PACBTI is only supported on CPUs where there's no choice but Thumb anyway. It certainly generated sensible output code when I tried an end-to-end compile-and-run test. But I've changed it anyway, and added the extra test check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157688



More information about the llvm-commits mailing list