1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=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: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
12 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[DEF]](s64), [[DEF1]](s64)
13 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[MV]](s128)
14 ; CHECK: $x0 = COPY [[TRUNC]](s64)
15 %0:_(s128) = G_IMPLICIT_DEF
16 %1:_(s64) = G_TRUNC %0(s128)
21 name: test_implicit_def_s3
26 ; CHECK-LABEL: name: test_implicit_def_s3
27 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
28 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 61
29 ; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[DEF]], [[C]](s64)
30 ; CHECK: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[C]](s64)
31 ; CHECK: $x0 = COPY [[ASHR]](s64)
32 %0:_(s3) = G_IMPLICIT_DEF
37 # FIXME: s2 not correctly handled
40 name: test_implicit_def_v2s32
44 ; CHECK-LABEL: name: test_implicit_def_v2s32
45 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
46 ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[DEF]](<4 x s32>)
47 ; CHECK: $x0 = COPY [[UV]](<2 x s32>)
48 ; CHECK: $x1 = COPY [[UV1]](<2 x s32>)
49 %0:_(<4 x s32>) = G_IMPLICIT_DEF
50 %1:_(<2 x s32> ), %2:_(<2 x s32>) = G_UNMERGE_VALUES %0
56 name: test_implicit_def_v4s64
60 ; CHECK-LABEL: name: test_implicit_def_v4s64
61 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
62 ; CHECK: [[DEF1:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
63 ; CHECK: $q0 = COPY [[DEF]](<2 x s64>)
64 ; CHECK: $q1 = COPY [[DEF1]](<2 x s64>)
65 %0:_(<4 x s64>) = G_IMPLICIT_DEF
66 %1:_(<2 x s64> ), %2:_(<2 x s64>) = G_UNMERGE_VALUES %0