[PATCH] D129858: [X86][BF16][WIP] Change the promote type of bf16 from i16 to f32 to follow the psABI

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 08:10:08 PDT 2022


pengfei created this revision.
pengfei added reviewers: bkramer, craig.topper, andrew.w.kaylor, RKSimon, LuoYuanke, FreddyYe.
Herald added subscribers: jsji, StephenFan, hiraditya.
Herald added a project: All.
pengfei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

X86 psABI has updated to support __bf16 type, the ABI of which is the
same as FP16. See https://discourse.llvm.org/t/patch-add-optional-bfloat16-support/63149

We have discussed this problem in D120395 <https://reviews.llvm.org/D120395>. Since we have the ABI for
__bf16 now, we can re-implement these AVX512-BF16 intrinsics with the
new type.

Please notice we will meet the same problem as FP16 in compiler-rt, I'll
change that patch in this patch too.

I put this patch here mainly to make sure if it is the right direction. We
can also follow what we have done for FP16, but I think it's a bit heavy
to BF16.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129858

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.h
  llvm/test/CodeGen/X86/bfloat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129858.444986.patch
Type: text/x-patch
Size: 13996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/ce2d2a69/attachment.bin>


More information about the llvm-commits mailing list