[all-commits] [llvm/llvm-project] 1cffd2: [TargetLowering][RISCV] Improve codegen for satura...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Mon Aug 7 03:22:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cffd26483201e51b04377e7348556138376c398
      https://github.com/llvm/llvm-project/commit/1cffd26483201e51b04377e7348556138376c398
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/RISCV/bfloat-convert.ll

  Log Message:
  -----------
  [TargetLowering][RISCV] Improve codegen for saturating bf16 to int conversion

Extending to f32 first (as is done for f16) results in better generated
code for RISC-V (and affects no other in-tree tests). Additionally,
performing the FP_EXTEND first seems equally justified for bf16 as for
f16.

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




More information about the All-commits mailing list