1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64-apple-ios -run-pass=legalizer %s -o - | FileCheck %s
5 name: test_scalar_or_small
8 liveins: $x0, $x1, $x2, $x3
9 ; CHECK-LABEL: name: test_scalar_or_small
10 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
11 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
12 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
13 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
14 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[TRUNC]], [[TRUNC1]]
15 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[OR]](s32)
16 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
21 %4:_(s8) = G_OR %2, %3
22 %5:_(s64) = G_ANYEXT %4
27 name: test_big_scalar_power_of_2
30 liveins: $x0, $x1, $x2, $x3
31 ; We have a temporary G_MERGE_VALUES in the legalizer that gets
32 ; cleaned up with the G_UNMERGE_VALUES, so we end up directly
33 ; copying the results of the G_OR ops.
35 ; CHECK-LABEL: name: test_big_scalar_power_of_2
36 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
37 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
38 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
39 ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
40 ; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[COPY]], [[COPY2]]
41 ; CHECK: [[OR1:%[0-9]+]]:_(s64) = G_OR [[COPY1]], [[COPY3]]
42 ; CHECK: $x0 = COPY [[OR]](s64)
43 ; CHECK: $x1 = COPY [[OR1]](s64)
44 ; CHECK: RET_ReallyLR implicit $x0, implicit $x1
49 %4:_(s128) = G_MERGE_VALUES %0, %1
50 %5:_(s128) = G_MERGE_VALUES %2, %3
51 %6:_(s128) = G_OR %4, %5
52 %7:_(s64), %8:_(s64) = G_UNMERGE_VALUES %6
55 RET_ReallyLR implicit $x0, implicit $x1