[PATCH] D98264: [AArch64] Implement __rndr, __rndrrs intrinsics

Sjoerd Meijer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 9 08:23:24 PST 2021


SjoerdMeijer added inline comments.


================
Comment at: clang/lib/Basic/Targets/AArch64.cpp:363
 
+  if (HasRandGen)
+    Builder.defineMacro("__ARM_FEATURE_RNG", "1");
----------------
Where/when is `HasRandGen` set?


================
Comment at: clang/test/Preprocessor/init-aarch64.c:28
 // AARCH64-NEXT: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
+// AARCH64-NEXT: #define  __ARM_FEATURE_RNG 1
 // AARCH64-NEXT: #define __ARM_FEATURE_UNALIGNED 1
----------------
Why are we expecting this here? Are we not only expecting this for v8.5?

We also need a negative test and CHECK-NOT of this where we don't expect this.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:1495
   let DecoderNamespace = "Fallback";
+  let Defs = [NZCV];
 }
----------------
Do all MRS instructions do this?


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:1274
+def : Pat<(AArch64mrs imm:$id),
+          (MRS imm:$id)>;
+
----------------
Nit: can be on the same line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98264



More information about the cfe-commits mailing list