[PATCH] D132385: [AArch64][PAC] Select XPAC for ptrauth.strip intrinsic.

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 08:53:40 PDT 2022


kristof.beyls added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:5859
+    if (Key > 3)
+      return false;
+    unsigned Opcode =
----------------
tschuett wrote:
> Can the Key be 2? Is an if-statement easier to comprehend than a ternary operator?
I guess having an enum for the valid key descriptors for AArch64 would make this and other code working with keys more readable. I'm not sure if that's typically done or where to define that enum?
Than in this location, maybe a switch on that enum would be clearer?

I see these constants 0,1,2,3 are also needed in tablegen files. Not sure if something similar to an enum exists in Tablegen?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132385



More information about the llvm-commits mailing list