This revision adds vector support for performFP_TO_INTCombine. Because we only have static rtz for rvv convert instruction, so only fold ftrunc. I leave performFP_TO_INT_SATCombine not modified, if this way was reviewed as a right one, I would change performFP_TO_INT_SATCombine then.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
8862 | I'm not sure we should do this. There is a slight semantic difference. If this was legal to replace (fp_to_int (ftrunc V)) with fp_to_int (V) we'd just do that in generic DAGCombine or InstCombine for all targets. I need to think through exactly what bad thing can happen. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
8862 | According to llvm langref: So I think they both are strict rounding towards zero. I tried common DAGCombiner at first, it would affect some other targets' test, so I switch to RISCV target specificed DAG combiner. |
A different vector implementation was implemented in D141599