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: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 61
28 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
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]+]]:_(s32) = G_IMPLICIT_DEF
46 ; CHECK: [[DEF1:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
47 ; CHECK: [[DEF2:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
48 ; CHECK: [[DEF3:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
49 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[DEF]](s32), [[DEF1]](s32), [[DEF2]](s32), [[DEF3]](s32)
50 ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[BUILD_VECTOR]](<4 x s32>)
51 ; CHECK: $x0 = COPY [[UV]](<2 x s32>)
52 ; CHECK: $x1 = COPY [[UV1]](<2 x s32>)
53 %0:_(<4 x s32>) = G_IMPLICIT_DEF
54 %1:_(<2 x s32> ), %2:_(<2 x s32>) = G_UNMERGE_VALUES %0
60 name: test_implicit_def_v4s64
64 ; CHECK-LABEL: name: test_implicit_def_v4s64
65 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
66 ; CHECK: [[DEF1:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
67 ; CHECK: $q0 = COPY [[DEF]](<2 x s64>)
68 ; CHECK: $q1 = COPY [[DEF1]](<2 x s64>)
69 %0:_(<4 x s64>) = G_IMPLICIT_DEF
70 %1:_(<2 x s64> ), %2:_(<2 x s64>) = G_UNMERGE_VALUES %0