1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=aarch64 -O0 -run-pass=legalizer -global-isel-abort=2 %s -o - | FileCheck %s
8 ; CHECK-LABEL: name: test_merge_s4
9 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 4
10 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
11 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
12 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[C2]], [[C1]]
13 ; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
14 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C3]](s64)
15 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
16 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C1]]
17 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SHL]](s32)
18 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[COPY1]]
19 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[OR]](s32)
20 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
21 %0:_(s64) = G_CONSTANT i64 0
24 %2:_(s8) = G_MERGE_VALUES %1, %1
26 %4:_(s64) = G_ANYEXT %3
30 name: test_merge_s16_s8
33 ; CHECK-LABEL: name: test_merge_s16_s8
34 ; CHECK: %a:_(s32) = COPY $w0
35 ; CHECK: %b:_(s32) = COPY $w1
36 ; CHECK: %a_t:_(s8) = G_TRUNC %a(s32)
37 ; CHECK: %b_t:_(s8) = G_TRUNC %b(s32)
38 ; CHECK: %m:_(s16) = G_MERGE_VALUES %a_t(s8), %b_t(s8)
39 ; CHECK: %ext:_(s64) = G_ANYEXT %m(s16)
40 ; CHECK: $x0 = COPY %ext(s64)
42 ; This isn't legal but we don't support widening the destination type.
45 %a_t:_(s8) = G_TRUNC %a
46 %b_t:_(s8) = G_TRUNC %b
48 %m:_(s16) = G_MERGE_VALUES %a_t, %b_t
49 %ext:_(s64) = G_ANYEXT %m