1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=legalizer -O0 %s -o - | FileCheck %s
4 name: test_implicit_def
9 ; CHECK-LABEL: name: test_implicit_def
10 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
11 ; CHECK: $x0 = COPY [[DEF]](s64)
12 %0:_(s128) = G_IMPLICIT_DEF
13 %1:_(s64) = G_TRUNC %0(s128)
18 name: test_implicit_def_s3
23 ; CHECK-LABEL: name: test_implicit_def_s3
24 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
25 ; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[DEF]], 3
26 ; CHECK: $x0 = COPY [[SEXT_INREG]](s64)
27 %0:_(s3) = G_IMPLICIT_DEF
32 # FIXME: s2 not correctly handled
35 name: test_implicit_def_v4s32
39 ; CHECK-LABEL: name: test_implicit_def_v4s32
40 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
41 ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[DEF]](<4 x s32>)
42 ; CHECK: $x0 = COPY [[UV]](<2 x s32>)
43 ; CHECK: $x1 = COPY [[UV1]](<2 x s32>)
44 %0:_(<4 x s32>) = G_IMPLICIT_DEF
45 %1:_(<2 x s32> ), %2:_(<2 x s32>) = G_UNMERGE_VALUES %0
51 name: test_implicit_def_v4s64
55 ; CHECK-LABEL: name: test_implicit_def_v4s64
56 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
57 ; CHECK: $q0 = COPY [[DEF]](<2 x s64>)
58 ; CHECK: $q1 = COPY [[DEF]](<2 x s64>)
59 %0:_(<4 x s64>) = G_IMPLICIT_DEF
60 %1:_(<2 x s64> ), %2:_(<2 x s64>) = G_UNMERGE_VALUES %0
65 name: test_implicit_def_v2s32
69 ; CHECK-LABEL: name: test_implicit_def_v2s32
70 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
71 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<2 x s32>)
72 ; CHECK: $w0 = COPY [[UV]](s32)
73 ; CHECK: $w1 = COPY [[UV1]](s32)
74 %0:_(<2 x s32>) = G_IMPLICIT_DEF
75 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0
80 name: test_implicit_def_v16s8
84 ; CHECK-LABEL: name: test_implicit_def_v16s8
85 ; CHECK: [[DEF:%[0-9]+]]:_(<16 x s8>) = G_IMPLICIT_DEF
86 ; CHECK: $q0 = COPY [[DEF]](<16 x s8>)
87 %0:_(<16 x s8>) = G_IMPLICIT_DEF
91 name: test_implicit_def_v8s16
95 ; CHECK-LABEL: name: test_implicit_def_v8s16
96 ; CHECK: [[DEF:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
97 ; CHECK: $q0 = COPY [[DEF]](<8 x s16>)
98 %0:_(<8 x s16>) = G_IMPLICIT_DEF
102 name: test_implicit_def_s88
106 ; CHECK-LABEL: name: test_implicit_def_s88
107 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
108 ; CHECK: $x0 = COPY [[DEF]](s64)
109 %undef:_(s88) = G_IMPLICIT_DEF
110 %trunc:_(s64) = G_TRUNC %undef
111 $x0 = COPY %trunc(s64)