[PATCH] D142102: [RISCV] Combine FP_TO_INT to vfwcvt/fvncvt
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 05:09:43 PST 2023
luke added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9592
+ // their operand types
+ if (!(VT.getScalarSizeInBits() == SrcVT.getScalarSizeInBits() ||
+ IsNarrowing || IsWidening))
----------------
fakepaper56 wrote:
> Is it better to use `VT.getScalarSizeInBits() > SrcVT.getScalarSizeInBits() * 2 || VT.getScalarSizeInBits() * 2 < SrcVT.getScalarSizeInBits()` ?
But wouldn't that allow invalid conversions like f32 -> i8?. From what I understand `fwcvt` always widens to a sew of double the size, and `fncvt` half
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142102/new/
https://reviews.llvm.org/D142102
More information about the llvm-commits
mailing list