[PATCH] D41557: [x86][icelake][vbmi2]

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 23 16:25:29 PST 2017

craig.topper added a comment.

Update the ICL macros in test/Preprocessor/predefined-arch-macros.c

Comment at: include/clang/Basic/BuiltinsX86.def:1254
+TARGET_BUILTIN(__builtin_ia32_vpshldd512_mask, "V16iV16iV16iiV16iUs", "", "avx512vbmi2")
+TARGET_BUILTIN(__builtin_ia32_vpshldq128_mask, "V2LLiV2LLiV2LLiiV2LLiUc", "", "avx512vl,avx512vbmi2")
+TARGET_BUILTIN(__builtin_ia32_vpshldq256_mask, "V4LLiV4LLiV4LLiiV4LLiUc", "", "avx512vl,avx512vbmi2")
Arguments corresponding to immediates need a capital 'I' in front of them so clang will error if they are a compile time constant.

Comment at: lib/Basic/Targets/X86.cpp:135
   case CK_Icelake:
-    // TODO: Add icelake features here.
Dont' remove the TODO until all features are added.

Comment at: lib/Basic/Targets/X86.cpp:589
+    // Enable BWI instruction if VBMI/VBMI2 is being enabled.
+    if (Name.startswith("avx512vbmi") && Enabled)
       Features["avx512bw"] = true;
Do two equality checks ORed together. I think bad target attributes on functions only issue a warning and are discarded in codegen. So strings like avx512vbmifoo can get here and we should ignore them.

  rC Clang


More information about the cfe-commits mailing list