Open lukel97 opened 10 months ago
@llvm/issue-subscribers-backend-risc-v
Author: Luke Lau (lukel97)
I think this stems from the frontend applying vscale_range attributes base on the command line only and not on function attributes.
We could maybe just delete this error. We should check if we have an error in the other direction, where a function has a zvl*b higher than vscale_max. That would be bad.
I think we need to change the frontend to adjust vscale_range based on the VLEN from attributes. Otherwise, I think we somewhat defeat the purpose of the zvl256b annotation since mid-level optimizer will still assume vscale_range in the function has a minimum of 2 not 4. That's sound, but probably not what the user wanted.
I think we need to change the frontend to adjust vscale_range based on the VLEN from attributes. Otherwise, I think we somewhat defeat the purpose of the zvl256b annotation since mid-level optimizer will still assume vscale_range in the function has a minimum of 2 not 4. That's sound, but probably not what the user wanted.
Agreed. I'm just not sure how much work that is.
Trying to use a target attribute to increase the minimum VLEN results in a fatal error, e.g. the below with
clang -march=rv64gv
:results in:
riscv-v-vector-bits-min is computed from vscale_range:
I think it should have been initialized to vscale_range(4, 1024) here based off of the target attribute.