[PATCH] D110319: [SelectionDAG] Fixed the scalable vectors issue on WidenVecRes_OverflowOp&WidenVecRes_SELECT
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 04:24:05 PDT 2021
frasercrmck added a comment.
I know they're both small changes but I think it would be good to split this patch up into separate parts: overflow and select. They're conceptually distinct changes. Then we could have more targeted tests for each operation and each change.
Also RISC-V would benefit from the `select` change, e.g., adding this sort of test to `test/CodeGen/RISCV/rvv/vselect-int-rv32.ll` and `vselect-int-rv64.ll`
define <vscale x 3 x i8> @vmerge_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb, <vscale x 3 x i1> %cond) {
%vc = select <vscale x 3 x i1> %cond, <vscale x 3 x i8> %va, <vscale x 3 x i8> %vb
ret <vscale x 3 x i8> %vc
}
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:854
void DAGTypeLegalizer::SetWidenedVector(SDValue Op, SDValue Result) {
- assert(Result.getValueType() ==
- TLI.getTypeToTransformTo(*DAG.getContext(), Op.getValueType()) &&
+ assert(Result.getValueType().getVectorElementType() ==
+ TLI.getTypeToTransformTo(*DAG.getContext(), Op.getValueType())
----------------
This looks suspicious to me. What's it for?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110319/new/
https://reviews.llvm.org/D110319
More information about the llvm-commits
mailing list