[PATCH] D107795: [AArch64][DAGCombine] Check the legality of the index of EXTRACT_SUBVECTOR

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 08:09:49 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/aarch64-avoid-illegal-extract-subvector.ll:8
+
+define dso_local void @h() local_unnamed_addr {
+; CHECK-LABEL: h:
----------------
david-arm wrote:
> Would it be possible to reduce this test a lot further? It looks like it shouldn't be too difficult to hand-write a new test that does something like:
> 
>   %i1 = extractelement <4 x i32> %x, i32 1
>   %zi1 = zext i32 %i1 to i64
>   %i2 = extractelement <4 x i32> %x, i32 2
>   %zi2 = zext i32 %i2 to i64
>   %v1 = insertelement <2 x i64> undef, %zi1, i32 0
>   %v2 = insertelement <2 x i64> %v1, %zi2, i32 1
> 
> That looks like what the DAG combine is testing for and since the first extract is at index 1 it is not a multiple of the number of elements in the final build vector (<2 x i64>)
@guopeilin Any luck with simplifying this test?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107795/new/

https://reviews.llvm.org/D107795



More information about the llvm-commits mailing list