[all-commits] [llvm/llvm-project] bc1819: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

Phoebe Wang via All-commits all-commits at lists.llvm.org
Wed Oct 19 08:47:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc1819389fb4701cdeba5e093278e32dd668d6d5
      https://github.com/llvm/llvm-project/commit/bc1819389fb4701cdeba5e093278e32dd668d6d5
  Author: Phoebe Wang <phoebe.wang at intel.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/BuiltinsX86.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Headers/avx512bf16intrin.h
    M clang/lib/Headers/avx512vlbf16intrin.h
    M clang/test/CodeGen/X86/avx512bf16-builtins.c
    A clang/test/CodeGen/X86/avx512bf16-error.c
    M clang/test/CodeGen/X86/avx512vlbf16-builtins.c
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/include/llvm/IR/IntrinsicsX86.td
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86InstrAVX512.td
    M llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
    M llvm/lib/Target/X86/X86RegisterInfo.td
    A llvm/test/CodeGen/X86/avx512bf16-intrinsics-upgrade.ll
    M llvm/test/CodeGen/X86/avx512bf16-intrinsics.ll
    A llvm/test/CodeGen/X86/avx512bf16-vl-intrinsics-upgrade.ll
    M llvm/test/CodeGen/X86/avx512bf16-vl-intrinsics.ll
    M llvm/test/CodeGen/X86/bfloat.ll
    M llvm/test/CodeGen/X86/stack-folding-avx512bf16.ll

  Log Message:
  -----------
  [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

This is an alternative of D120395 and D120411.

Previously we use `__bfloat16` as a typedef of `unsigned short`. The
name may give user an impression it is a brand new type to represent
BF16. So that they may use it in arithmetic operations and we don't have
a good way to block it.

To solve the problem, we introduced `__bf16` to X86 psABI and landed the
support in Clang by D130964. Now we can solve the problem by switching
intrinsics to the new type.

Reviewed By: LuoYuanke, RKSimon

Differential Revision: https://reviews.llvm.org/D132329




More information about the All-commits mailing list