[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / CodeGen / AArch64 / GlobalISel / legalize-freeze.mir
blobba49885723604749ae7a452e1889e74696276899
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=aarch64 -run-pass=legalizer -global-isel-abort=1 -O0 %s -o - | FileCheck %s
3 ---
4 name:            test_freeze_s64
5 body: |
6   bb.0.entry:
7     liveins: $x0
9     ; CHECK-LABEL: name: test_freeze_s64
10     ; CHECK: %x0:_(s64) = COPY $x0
11     ; CHECK: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE %x0
12     ; CHECK: $x0 = COPY [[FREEZE]](s64)
13     %x0:_(s64) = COPY $x0
14     %1:_(s64) = G_FREEZE %x0
15     $x0 = COPY %1(s64)
16 ...
17 ---
18 name: test_freeze_v4s32
19 body: |
20   bb.0:
21     liveins: $q0
23     ; CHECK-LABEL: name: test_freeze_v4s32
24     ; CHECK: %q0:_(<4 x s32>) = COPY $q0
25     ; CHECK: [[FREEZE:%[0-9]+]]:_(<4 x s32>) = G_FREEZE %q0
26     ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FREEZE]](<4 x s32>)
27     ; CHECK: $x0 = COPY [[UV]](<2 x s32>)
28     ; CHECK: $x1 = COPY [[UV1]](<2 x s32>)
29     %q0:_(<4 x s32>) = COPY $q0
30     %0:_(<4 x s32>) = G_FREEZE %q0
31     %1:_(<2 x s32> ), %2:_(<2 x s32>) = G_UNMERGE_VALUES %0
32     $x0 = COPY %1
33     $x1 = COPY %2
34 ...
35 ---
36 name: test_freeze_v4s64
37 body: |
38   bb.0:
40     ; CHECK-LABEL: name: test_freeze_v4s64
41     ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
42     ; CHECK: [[FREEZE:%[0-9]+]]:_(<2 x s64>) = G_FREEZE [[DEF]]
43     ; CHECK: [[FREEZE1:%[0-9]+]]:_(<2 x s64>) = G_FREEZE [[DEF]]
44     ; CHECK: $q0 = COPY [[FREEZE]](<2 x s64>)
45     ; CHECK: $q1 = COPY [[FREEZE1]](<2 x s64>)
46     %undef:_(<4 x s64>) = G_IMPLICIT_DEF
47     %0:_(<4 x s64>) = G_FREEZE %undef
48     %1:_(<2 x s64> ), %2:_(<2 x s64>) = G_UNMERGE_VALUES %0
49     $q0 = COPY %1
50     $q1 = COPY %2
51 ...
52 ---
53 name: test_freeze_v2s32
54 body: |
55   bb.0:
56     liveins: $d0
58     ; CHECK-LABEL: name: test_freeze_v2s32
59     ; CHECK: %d0:_(<2 x s32>) = COPY $d0
60     ; CHECK: [[FREEZE:%[0-9]+]]:_(<2 x s32>) = G_FREEZE %d0
61     ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[FREEZE]](<2 x s32>)
62     ; CHECK: $w0 = COPY [[UV]](s32)
63     ; CHECK: $w1 = COPY [[UV1]](s32)
64     %d0:_(<2 x s32>) = COPY $d0
65     %0:_(<2 x s32>) = G_FREEZE %d0
66     %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0
67     $w0 = COPY %1
68     $w1 = COPY %2
69 ...
70 ---
71 name: test_freeze_v8s8
72 body: |
73   bb.0:
74     liveins: $d0
76     ; CHECK-LABEL: name: test_freeze_v8s8
77     ; CHECK: %d0:_(<8 x s8>) = COPY $d0
78     ; CHECK: [[FREEZE:%[0-9]+]]:_(<8 x s8>) = G_FREEZE %d0
79     ; CHECK: [[UV:%[0-9]+]]:_(<4 x s8>), [[UV1:%[0-9]+]]:_(<4 x s8>) = G_UNMERGE_VALUES [[FREEZE]](<8 x s8>)
80     ; CHECK: $w0 = COPY [[UV]](<4 x s8>)
81     ; CHECK: $w1 = COPY [[UV1]](<4 x s8>)
82     %d0:_(<8 x s8>) = COPY $d0
83     %0:_(<8 x s8>) = G_FREEZE %d0
84     %1:_(<4 x s8>), %2:_(<4 x s8>) = G_UNMERGE_VALUES %0
85     $w0 = COPY %1
86     $w1 = COPY %2
87 ...
88 ---
89 name:            test_freeze_s1
90 body: |
91   bb.0.entry:
92     liveins: $x0
93     ; CHECK-LABEL: name: test_freeze_s1
94     ; CHECK: %x:_(s1) = G_IMPLICIT_DEF
95     ; CHECK: %freeze:_(s1) = G_FREEZE %x
96     ; CHECK: %ext:_(s64) = G_ZEXT %freeze(s1)
97     ; CHECK: $x0 = COPY %ext(s64)
98     %x:_(s1) = G_IMPLICIT_DEF
99     %freeze:_(s1) = G_FREEZE %x
100     %ext:_(s64) = G_ZEXT %freeze
101     $x0 = COPY %ext(s64)
104 name:            test_freeze_s2
105 body: |
106   bb.0.entry:
107     liveins: $x0
108     ; CHECK-LABEL: name: test_freeze_s2
109     ; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
110     ; CHECK: [[COPY:%[0-9]+]]:_(s8) = COPY [[DEF]](s8)
111     ; CHECK: [[FREEZE:%[0-9]+]]:_(s8) = G_FREEZE [[COPY]]
112     ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
113     ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FREEZE]](s8)
114     ; CHECK: %ext:_(s64) = G_AND [[ANYEXT]], [[C]]
115     ; CHECK: $x0 = COPY %ext(s64)
116     %x:_(s2) = G_IMPLICIT_DEF
117     %freeze:_(s2) = G_FREEZE %x
118     %ext:_(s64) = G_ZEXT %freeze
119     $x0 = COPY %ext(s64)