[DAGCombine] Check the legality of the index of EXTRACT_SUBVECTOR
authorPeilin Guo <guopeilin1@huawei.com>
Wed, 25 Aug 2021 11:31:00 +0000 (19:31 +0800)
committerPeilin Guo <guopeilin1@huawei.com>
Wed, 25 Aug 2021 11:33:39 +0000 (19:33 +0800)
commit4c4dbeeeea4ae3eb96f4a9ea8d4584ea973f68fe
treecca592908d9349da64916bb492549e62d7b8acc1
parentcc1e87bf55e73e769e96e6cc3fcfc69f88d94097
[DAGCombine] Check the legality of the index of EXTRACT_SUBVECTOR

For ISD::EXTRACT_SUBVECTOR, its second operand must be a constant
multiple of the known-minimum vector length of the result type.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D107795
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/aarch64-avoid-illegal-extract-subvector.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.format.v3f16.ll