[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 01:48:16 PDT 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2185
+    addRegisterClass(MVT::v32bf16, &X86::VR512RegClass);
+    setOperationAction(ISD::BUILD_VECTOR, MVT::bf16, Custom);
+    setOperationAction(ISD::BUILD_VECTOR, MVT::v8bf16, Custom);
----------------
RKSimon wrote:
> Isn't MVT::bf16 scalar? 
Yes, when legalize the source operand, the legalizer gets action as the type action, i.e., `TypeSoftPromoteHalf`. However, we don't provide methods to handle any vector actions in soft promote. So we need to set it `Custom` here to do the customization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132329



More information about the cfe-commits mailing list