[PATCH] D49376: [NEON] Define half-precision vrnd intrinsics only when available

Ivan Kosarev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 23 06:35:12 PDT 2018


kosarev added inline comments.


================
Comment at: include/clang/Basic/arm_neon.td:1419
   // Vector rounding
-  def FRINTZH      : SInst<"vrnd",  "dd", "hQh">;
-  def FRINTNH      : SInst<"vrndn", "dd", "hQh">;
-  def FRINTAH      : SInst<"vrnda", "dd", "hQh">;
-  def FRINTPH      : SInst<"vrndp", "dd", "hQh">;
-  def FRINTMH      : SInst<"vrndm", "dd", "hQh">;
-  def FRINTXH      : SInst<"vrndx", "dd", "hQh">;
+  let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_DIRECTED_ROUNDING) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)" in {
+    def FRINTZH      : SInst<"vrnd",  "dd", "hQh">;
----------------
SjoerdMeijer wrote:
> nit: is the indentation a bit off here?
It's a nested `let ArchGuard`, so I guess we do want the indentation here?


https://reviews.llvm.org/D49376





More information about the cfe-commits mailing list