[PATCH] D119469: [AArch64] Turn truncating buildvectors into truncates
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 06:38:28 PST 2022
david-arm added inline comments.
Herald added a project: All.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9304
+ V.getOperand(8).getOperand(0), V.getOperand(12).getOperand(0)};
+ for (int I = 0; I < 4; I++)
+ if (Trunc[I].getValueType() == MVT::v4i32)
----------------
I think you're missing some test cases here because your code permits the possibility of mixed types, i.e.
%a0 = extractelement <4 x i16> %a, i32 0
...
%b0 = extractelement <4 x i32> %b, i32 0
...
%c0 = extractelement <4 x i16> %c, i32 0
...
%d0 = extractelement <4 x i32> %d, i32 0
...
%t0 = trunc i16 %a0 to i8
...
%t4 = trunc i32 %b0 to i8
...
%t8 = trunc i16 %c0 to i8
...
%t12 = trunc i32 %d0 to i8
...
%i0 = insertelement <16 x i8> undef, i8 %t0, i32 0
...
%i4 = insertelement <16 x i8> %i3, i8 %t4, i32 4
...
%i8 = insertelement <16 x i8> %i7, i8 %t8, i32 8
...
%i12 = insertelement <16 x i8> %i11, i8 %t12, i32 12
...
Can you add at least one test for mixed types?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119469/new/
https://reviews.llvm.org/D119469
More information about the llvm-commits
mailing list