[llvm] [AArch64][PAC] Select auth+load into LDRAA/LDRAB/LDRA[pre]. (PR #123769)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 08:56:06 PST 2025


================
@@ -25,6 +25,23 @@ def G_ADD_LOW : AArch64GenericInstruction {
   let hasSideEffects = 0;
 }
 
+// Represents an auth-load instruction.  Produced post-legalization from
+// G_LOADs of ptrauth_auth intrinsics, with variants for keys/discriminators.
+def G_LDRA : AArch64GenericInstruction {
+  let OutOperandList = (outs type0:$dst);
+  let InOperandList = (ins type1:$addr, i64imm:$offset, i32imm:$key, i64imm:$disc, type0:$addrdisc);
+  let hasSideEffects = 0;
----------------
atrosinenko wrote:

Spotted that in GISel, `G_LDRA` and `G_LDRApre` both define `hasSideEffects` to false. In DAGISel, on the other hand, both `LDRA` and `LDRApre` define `hasSideEffects` to true. Is that intended?

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


More information about the llvm-commits mailing list