[AArch64][GlobalISel] Make G_BUILD_VECTOR os <16 x s8> legal.

This commit is contained in:
Amara Emerson 2020-09-16 11:19:08 -07:00
parent 4d4f092283
commit 6ad33d8360
2 changed files with 18 additions and 1 deletions

View File

@ -568,7 +568,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
});
getActionDefinitionsBuilder(G_BUILD_VECTOR)
.legalFor({{v4s16, s16},
.legalFor({{v16s8, s8},
{v4s16, s16},
{v8s16, s16},
{v2s32, s32},
{v4s32, s32},

View File

@ -56,3 +56,19 @@ body: |
$q0 = COPY %2(<2 x p0>)
RET_ReallyLR
...
---
name: legal_v16s8
body: |
bb.0:
; CHECK-LABEL: name: legal_v16s8
; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
; CHECK: [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8)
; CHECK: $q0 = COPY [[BUILD_VECTOR]](<16 x s8>)
; CHECK: RET_ReallyLR
%0:_(s8) = G_IMPLICIT_DEF
%1:_(s8) = G_IMPLICIT_DEF
%2:_(<16 x s8>) = G_BUILD_VECTOR %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8)
$q0 = COPY %2(<16 x s8>)
RET_ReallyLR
...