-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[RISCV] Can't select f16 extract_vector_elt with zfhmin #110126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
@llvm/issue-subscribers-backend-risc-v Author: Luke Lau (lukel97)
```llvm
define half @f(<vscale x 4 x half> %v) {
%x = extractelement <vscale x 4 x half> %v, i32 0
ret half %x
}
```
With
However with only
|
lukel97
added a commit
to lukel97/llvm-project
that referenced
this issue
Sep 26, 2024
This is the f64/f32 version of llvm#109774. I've left out f16 and bf16 for now because there's a separate issue where we can't select extract_vector_elt when f16/bf16 is a legal type, see llvm#110126.
I should also mention that we have the same issue for bf16 and zfbfmin with zvfbfmin |
lukel97
added a commit
to lukel97/llvm-project
that referenced
this issue
Sep 26, 2024
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 llvm#110126
lukel97
added a commit
that referenced
this issue
Sep 27, 2024
…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
lukel97
added a commit
that referenced
this issue
Sep 27, 2024
Sterling-Augustine
pushed a commit
to Sterling-Augustine/llvm-project
that referenced
this issue
Sep 27, 2024
…lvm#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 llvm#110126
Sterling-Augustine
pushed a commit
to Sterling-Augustine/llvm-project
that referenced
this issue
Sep 27, 2024
This is the f64/f32 version of llvm#109774. I've left out f16 and bf16 for now because there's a separate issue where we can't select extract_vector_elt when f16/bf16 is a legal type, see llvm#110126.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
-mattr=+v,+zfhmin,+zvfhmin
(or+zfh
) we fail to select the extract_vector_elt:However with only
-mattr=+v,+zvfhmin
we can lower this because the f16 gets softened:The text was updated successfully, but these errors were encountered: