[all-commits] [llvm/llvm-project] 711a17: [AArch64][GlobalISel] Lower BF16 FPTRUNC (#193941)

David Green via All-commits all-commits at lists.llvm.org
Tue Apr 28 01:39:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 711a17d0b38e15f786e4ed709a3219cdf5bb3119
      https://github.com/llvm/llvm-project/commit/711a17d0b38e15f786e4ed709a3219cdf5bb3119
  Author: David Green <david.green at arm.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
    M llvm/include/llvm/CodeGenTypes/LowLevelType.h
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/test/CodeGen/AArch64/bf16-instructions.ll
    M llvm/test/CodeGen/AArch64/bf16-v4-instructions.ll
    M llvm/test/CodeGen/AArch64/bf16-v8-instructions.ll

  Log Message:
  -----------
  [AArch64][GlobalISel] Lower BF16 FPTRUNC (#193941)

When the architecture +bf16 features is available this is simple as we
lower to a standard instruction. When not available we need to expand to
a series of instructions that performs the necessary rounding. The code
to do that is a port of TargetLowering::expandFP_ROUND to GISel, minus
the float64 odd rounding via expandRoundInexactToOdd. f64 will follow in
a followup patch.

uitofp and sitofp are currently disabled, so that we can take this one
step at a time and check each part in turn. The LLT fp types attempt to
return true for ieee types without UseExtended for types of the correct
size, always returning false for non-standard types.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list