This change make WidenVecRes_OverflowOp&WidenVecRes_SELECT work for scalable vectors. This patch base on https://reviews.llvm.org/D110058
Signed-off-by: Eric Tang <tangxingxin1008@gmail.com>
Paths
| Differential D110319
[SelectionDAG] Fixed the scalable vectors issue on WidenVecRes_OverflowOp&WidenVecRes_SELECT Needs ReviewPublic Authored by tangxingxin1008 on Sep 23 2021, 4:11 AM.
Details
Summary This change make WidenVecRes_OverflowOp&WidenVecRes_SELECT work for scalable vectors. This patch base on https://reviews.llvm.org/D110058 Signed-off-by: Eric Tang <tangxingxin1008@gmail.com>
Diff Detail
Event TimelineComment Actions 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 Actions
thanks, I will be changed according to your advice.
Comment Actions For SetWidenedVector, this change reduced the restrictions. In AArch64 sve, normally, SetWidenedVector only support nxv1i1 -> nxv2i1, after this change, the nxv1i1 -> nxv4i1, nxv1i1 -> nxv8i1, nxv1i1 -> nxv16i1 can also work.
Revision Contents
Diff 374502 llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/test/CodeGen/AArch64/sve-smulo-sdnode.ll
llvm/test/CodeGen/AArch64/sve-umulo-sdnode.ll
|
clang-format not found in user’s local PATH; not linting file.