According to the 1.0-rc1, 18.2 : The V extension supports all vector load and store instructions (Section Vector Loads and Stores), except the V extension does not support EEW=64 for index values when XLEN=32, disable EEW=64 for vector index load/store when XLEN=32.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
571 | Ignoring whether the change is actually correct, this should be capitalised as XLen32EEWList, but really this should actually be RV32 not XLen32 as that's not a term we use. | |
723 | Xlen64 is not an extension. Nor is RV64I, even, it is a base ISA, but that would at least be somewhat defensible. In fact, Xlen64 would be parsed as a valid non-standard extension called "Xlen" with major version 64 and minor version 0, just like any other Xfoo. |
In the 1.0-rc1, 18.2: The V extension supports all vector load and store instructions (Section Vector Loads and Stores), except the V extension does not support EEW=64 for index values when XLEN=32.
I think this means that all index instruction with eew=64 is only supported in RV64.
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
723 | So change Xlen64 to RV64 or create a new field of RVVBuiltin to describle it? Which one do you think is better? |
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
571 | While we're here I'm wondering whether a top-level Xlen32EEWList/RV32EEWList is conveying the wrong thing. It's only the loads and stores that have a different EEW list on RV32, isn't it? |
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
571 | Yes, only for index load/store, we should add the macro to the generated header to make EEW=64 just available on RV64. |
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
710 | There is no need to define Xlen32EEWList. You could use EEWList[0-2] for the purpose. |
remove Xlen32EEWList and rename Xlen64 to RV64.
clang/include/clang/Basic/riscv_vector.td | ||
---|---|---|
710 | Done, thank you. |
clang/utils/TableGen/RISCVVEmitter.cpp | ||
---|---|---|
178 | RequiredExtensions should be a reference | |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
401 | This would just print a message to stderr but wouldn't fail the program. Probably should use report_fatal_error. Or we could let the caller go to SelectCode which would also trigger a "Cannot select" fatal error. | |
483 | Same as above |
Replace errs with report_fatal_error and change the vector argument type to reference type.
Truncate i64 index vector for vector gather/scatter in RV32 to avoid using index load instruction that has EEW=64.
Ignoring whether the change is actually correct, this should be capitalised as XLen32EEWList, but really this should actually be RV32 not XLen32 as that's not a term we use.