1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=aarch64 -O0 -run-pass=legalizer %s -o - | FileCheck %s
8 ; CHECK-LABEL: name: test_merge_s4
9 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
10 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
11 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
12 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
13 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C2]]
14 ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
15 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
16 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C3]]
17 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[AND]](s32)
18 ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
19 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
20 ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C4]]
21 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SHL]](s32)
22 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[COPY1]]
23 ; CHECK: [[TRUNC2:%[0-9]+]]:_(s8) = G_TRUNC [[OR]](s32)
24 ; CHECK: [[COPY2:%[0-9]+]]:_(s8) = COPY [[TRUNC2]](s8)
25 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[COPY2]](s8)
26 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
27 %0:_(s64) = G_CONSTANT i64 0
30 %2:_(s8) = G_MERGE_VALUES %1, %1
32 %4:_(s64) = G_ANYEXT %3