Add codegen for vp.fptosi.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
3696 | This doesn't work if the int and FP types don't have the same element size. FP_TO_SINT_VL does not guarantee this. See the lowering for ISD::FP_TO_SINT which has to handle widening, narrowing, and multi instruction cases. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
3696 | Done, thanks! |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
6103 | Shouldn't this be a node that uses VL and mask? |
Comment Actions
There is also an implementation here https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/raw/EPI/llvm/lib/Target/RISCV/RISCVISelLowering.cpp look for lowerVPFPIntConvOp. This is what myself, Fraser, or Roger had been planning to use for upstream. We just hadn't go there yet because we were waiting for fptoui and uitofp to be added.
This doesn't work if the int and FP types don't have the same element size. FP_TO_SINT_VL does not guarantee this. See the lowering for ISD::FP_TO_SINT which has to handle widening, narrowing, and multi instruction cases.