Like in the scalar domain, combine calls to (fp_to_int (ftrunc X)) on
scalable and fixed-length vectors into a single vfcvt instruction.
For truncating rounds, the static vfcvt.rtz rounding mode is used.
Otherwise use the VFCVT_RM_ variants to set the rounding mode
dynamically.
Closes https://github.com/llvm/llvm-project/issues/56737
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
1919 | Is this correct? | |
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td | ||
162 | I noticed the unsigned variants of some of the conversion instructions were missing, so I've added them in here since they're generated by the combine. Not sure if their absence is intentional or not. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
9577 | Whoops, presumably this means that we can handle f16 -> i32 with vfwcvt.xu.f.v, f32 -> i16 with vfncvt.xu.f.v and so on? |
Is this correct?