[llvm] [AArch64][PAC] Lower jump-tables using hardened pseudo. (PR #97666)
Daniil Kovalev via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 7 23:51:26 PDT 2024
================
@@ -10678,6 +10678,21 @@ SDValue AArch64TargetLowering::LowerBR_JT(SDValue Op,
auto *AFI = DAG.getMachineFunction().getInfo<AArch64FunctionInfo>();
AFI->setJumpTableEntryInfo(JTI, 4, nullptr);
+ // With jump-table-hardening, we only expand the full jump table dispatch
+ // sequence later, to guarantee the integrity of the intermediate values.
+ if (DAG.getMachineFunction().getFunction().hasFnAttribute(
+ "jump-table-hardening") ||
+ Subtarget->getTargetTriple().isArm64e()) {
----------------
kovdan01 wrote:
Isn't check against arm64e duplicating the check against function attribute? I'm not aware of full arm64e spec, but I suppose that frontend will set "jump-table-hardening" attribute when compiling for arm64e, so there is probably no need for this check here. The same applies to GlobalISel.
Feel free to ignore - I'm OK with such Apple-specific stuff if it's considered essential.
https://github.com/llvm/llvm-project/pull/97666
More information about the llvm-commits
mailing list