[PATCH] D159250: [X86][RFC] Add new option `-m[no-]evex512` to disable ZMM and 64-bit mask instructions for AVX512 features

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 00:21:26 PDT 2023


pengfei added inline comments.


================
Comment at: clang/lib/CodeGen/Targets/X86.cpp:1517
+  bool Caller256 = CallerMap.lookup("avx512f") && !CallerMap.lookup("evex512");
+  bool Callee256 = CallerMap.lookup("avx512f") && !CallerMap.lookup("evex512");
+
----------------
RKSimon wrote:
> typo in Callee256?
Good catch!


================
Comment at: clang/test/CodeGen/X86/avx512-error.c:9
+  return __builtin_ia32_sqrtpd512(a, _MM_FROUND_CUR_DIRECTION); // expected-error {{'__builtin_ia32_sqrtpd512' needs target feature evex512}}
+}
----------------
RKSimon wrote:
> add  __mmask64 test ? _knot_mask64 or _cvtmask64_u64 maybe?
Good point! This exposed a design problem. We cannot only check for 512-bit vector, instead, we need to add `evex512` to all ZMM or 64-bit mask builtin/intrinsic attribute list.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159250



More information about the cfe-commits mailing list