[PATCH] D123841: [RISCV] Add rvv codegen support for vp.fptrunc.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 02:32:58 PDT 2022
jacquesguan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4438
+ if (!VT.isFixedLengthVector() && !IsVPFPTrunc)
+ return Op;
+ Src = DAG.getNode(RISCVISD::FP_ROUND_VL, DL, ContainerVT, Src, Mask, VL);
----------------
frasercrmck wrote:
> We're returning here after already creating the VL ops. Ideally we'd only create nodes once we know we're going to commit to returning something. This is a smaller issue in the original code but I don't think it needs to be like this. The early-exit check isn't dependent on any previous computations.
Done, I moved it to the begin of the function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123841/new/
https://reviews.llvm.org/D123841
More information about the llvm-commits
mailing list