[all-commits] [llvm/llvm-project] 2b84ef: [RISCV] Handle f16/bf16 extract_vector_elt when sc...

Luke Lau via All-commits all-commits at lists.llvm.org
Thu Sep 26 17:01:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b84ef06ac55ac8de3c210d059ec3a3c96666a90
      https://github.com/llvm/llvm-project/commit/2b84ef06ac55ac8de3c210d059ec3a3c96666a90
  Author: Luke Lau <luke at igalia.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/extractelt-fp.ll

  Log Message:
  -----------
  [RISCV] Handle f16/bf16 extract_vector_elt when scalar type is legal (#110144)

When the scalar type is illegal, it gets softened during type
legalization and gets lowered as an integer.

However with zfhmin/zfbfmin the type is now legal and it passes through
type legalization where it crashes because we didn't have any custom
lowering or patterns for it.

This handles said case via the existing custom lowering to a vslidedown
and vfmv.f.s.
It also handles the case where we only have zvfhmin/zvfbfmin and don't
have vfmv.f.s, in which case we need to extract it to a GPR and then use
fmv.h.x.

Fixes #110126



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