[all-commits] [llvm/llvm-project] a3cd26: [RISCV] Remove {s, u}int_to_fp custom op action for...

Luke Lau via All-commits all-commits at lists.llvm.org
Thu Oct 10 06:40:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3cd269fbebecb6971e216a9c29ad8933ad7b0fc
      https://github.com/llvm/llvm-project/commit/a3cd269fbebecb6971e216a9c29ad8933ad7b0fc
  Author: Luke Lau <luke at igalia.com>
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/Analysis/CostModel/RISCV/cast-half.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll

  Log Message:
  -----------
  [RISCV] Remove {s,u}int_to_fp custom op action for f16/bf16 (#111471)

It turns out that {s,u}int_to_fp nodes get their operation action from
their operand's type, not the result type, so we don't need to set it
for fp16 or bf16. vp_{s,u}int_to_fp uses the result type though so we
need to keep it.

This also means that we can lower int_to_fp for fixed length bf16
vectors already, so this adds tests for that.

The cost model test changes are due to BasicTTIImpl's getCastInstrCost
not taking into account that int_to_fp needs its legal type swapped.
This can be fixed in a later patch, but its worth noting that the
affected types in the tests currently crash when lowered anyway (due to
them needing split at LMUL > 8)



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