1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64 -run-pass=aarch64-prelegalizer-combiner %s -o - | FileCheck %s
---
name: test_foldable_s32
body: |
bb.0:
liveins: $x0, $x1
; CHECK-LABEL: name: test_foldable_s32
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[SRC:%src]]:_(<2 x s32>) = COPY $x1
; CHECK-NEXT: [[UNDEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
; CHECK-NEXT: [[MID:%[0-9]+]]:_(<4 x s32>) = G_CONCAT_VECTORS [[SRC]](<2 x s32>), [[UNDEF]](<2 x s32>)
; CHECK-NEXT: [[DST:%dst]]:_(<4 x s16>) = G_TRUNC [[MID]]
; CHECK-NEXT: $x0 = COPY [[DST]]
%src:_(<2 x s32>) = COPY $x1
%a:_(s32), %b:_(s32) = G_UNMERGE_VALUES %src:_(<2 x s32>)
%T_a:_(s16) = G_TRUNC %a:_(s32)
%T_b:_(s16) = G_TRUNC %b:_(s32)
%Undef:_(s16) = G_IMPLICIT_DEF
%dst:_(<4 x s16>) = G_BUILD_VECTOR %T_a:_(s16), %T_b:_(s16), %Undef:_(s16), %Undef:_(s16)
$x0 = COPY %dst
...
---
name: test_unfoldable_s32
body: |
bb.0:
liveins: $w0, $x1
; CHECK-LABEL: name: test_unfoldable_s32
; CHECK: liveins: $w0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[SRC:%src]]:_(<2 x s32>) = COPY $x1
; CHECK-NEXT: [[A:%a]]:_(s16), [[B:%b]]:_(s16), [[C:%c]]:_(s16), %d:_(s16) = G_UNMERGE_VALUES [[SRC]](<2 x s32>)
; CHECK-NEXT: [[T_A:%T_a]]:_(s8) = G_TRUNC [[A]](s16)
; CHECK-NEXT: [[T_B:%T_b]]:_(s8) = G_TRUNC [[B]](s16)
; CHECK-NEXT: [[T_C:%T_c]]:_(s8) = G_TRUNC [[C]](s16)
; CHECK-NEXT: [[UNDEF:%Undef]]:_(s8) = G_IMPLICIT_DEF
; CHECK-NEXT: [[DST:%dst]]:_(<4 x s8>) = G_BUILD_VECTOR [[T_A]](s8), [[T_B]](s8), [[T_C]](s8), [[UNDEF]](s8)
; CHECK-NEXT: $w0 = COPY [[DST]](<4 x s8>)
%src:_(<2 x s32>) = COPY $x1
%a:_(s16), %b:_(s16), %c:_(s16), %d:_(s16) = G_UNMERGE_VALUES %src:_(<2 x s32>)
%T_a:_(s8) = G_TRUNC %a:_(s16)
%T_b:_(s8) = G_TRUNC %b:_(s16)
%T_c:_(s8) = G_TRUNC %c:_(s16)
%Undef:_(s8) = G_IMPLICIT_DEF
%dst:_(<4 x s8>) = G_BUILD_VECTOR %T_a:_(s8), %T_b:_(s8), %T_c:_(s8), %Undef:_(s8)
$w0 = COPY %dst
...
|