[PATCH] D148508: [AArch64] Make stack tagging compatible with SLH

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 02:44:53 PDT 2023


kristof.beyls created this revision.
kristof.beyls added reviewers: olista01, eugenis.
Herald added a subscriber: hiraditya.
Herald added a project: All.
kristof.beyls requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

See https://github.com/llvm/llvm-project/issues/61830

Speculative Load Hardening (SLH) requires that conditional branches are
implemented using B.cc branches, not using {TC}B{N}Z branches.

Stack tagging was expanding one of the pseudo instructions it uses to
cbnz. This commit changes that to use b.ne instead.

Note that the added regression test was added to settag.ll rather than
speculation-hardening.ll. The speculation-hardening.ll tests also check
that all tests in the file work with global-isel. It seems that stack
tagging does not work yet with global-isel. Therefore, testing the
combination of stack tagging and SLH hard to be added to a test file
that doesn't test global-isel, i.e. settag.ll


https://reviews.llvm.org/D148508

Files:
  llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
  llvm/test/CodeGen/AArch64/settag-merge-order.ll
  llvm/test/CodeGen/AArch64/settag-merge.ll
  llvm/test/CodeGen/AArch64/settag.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148508.514147.patch
Type: text/x-patch
Size: 7297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/e93bd359/attachment.bin>


More information about the llvm-commits mailing list