1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
5 name: test_scalar_sub_big
8 ; CHECK-LABEL: name: test_scalar_sub_big
9 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
10 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
11 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
12 ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
13 ; CHECK: [[USUBO:%[0-9]+]]:_(s64), [[USUBO1:%[0-9]+]]:_(s1) = G_USUBO [[COPY]], [[COPY2]]
14 ; CHECK: [[USUBE:%[0-9]+]]:_(s64), [[USUBE1:%[0-9]+]]:_(s1) = G_USUBE [[COPY1]], [[COPY3]], [[USUBO1]]
15 ; CHECK: $x0 = COPY [[USUBO]](s64)
16 ; CHECK: $x1 = COPY [[USUBE]](s64)
21 %4:_(s128) = G_MERGE_VALUES %0(s64), %1(s64)
22 %5:_(s128) = G_MERGE_VALUES %2(s64), %3(s64)
23 %6:_(s128) = G_SUB %4, %5
24 %7:_(s64), %8:_(s64) = G_UNMERGE_VALUES %6(s128)
30 name: test_scalar_sub_big_nonpow2
33 ; CHECK-LABEL: name: test_scalar_sub_big_nonpow2
34 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
35 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
36 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
37 ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
38 ; CHECK: [[USUBO:%[0-9]+]]:_(s64), [[USUBO1:%[0-9]+]]:_(s1) = G_USUBO [[COPY]], [[COPY1]]
39 ; CHECK: [[USUBE:%[0-9]+]]:_(s64), [[USUBE1:%[0-9]+]]:_(s1) = G_USUBE [[COPY1]], [[COPY2]], [[USUBO1]]
40 ; CHECK: [[USUBE2:%[0-9]+]]:_(s64), [[USUBE3:%[0-9]+]]:_(s1) = G_USUBE [[COPY2]], [[COPY3]], [[USUBE1]]
41 ; CHECK: $x0 = COPY [[USUBO]](s64)
42 ; CHECK: $x1 = COPY [[USUBE]](s64)
43 ; CHECK: $x2 = COPY [[USUBE2]](s64)
48 %4:_(s192) = G_MERGE_VALUES %0(s64), %1(s64), %2(s64)
49 %5:_(s192) = G_MERGE_VALUES %1(s64), %2(s64), %3(s64)
50 %6:_(s192) = G_SUB %4, %5
51 %7:_(s64), %8:_(s64), %9:_(s64) = G_UNMERGE_VALUES %6(s192)
58 name: test_scalar_sub_small
61 ; CHECK-LABEL: name: test_scalar_sub_small
62 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
63 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
64 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
65 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
66 ; CHECK: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[TRUNC]], [[TRUNC1]]
67 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SUB]](s32)
68 ; CHECK: $x0 = COPY [[ANYEXT]](s64)
71 %2:_(s8) = G_TRUNC %0(s64)
72 %3:_(s8) = G_TRUNC %1(s64)
73 %4:_(s8) = G_SUB %2, %3
74 %5:_(s64) = G_ANYEXT %4(s8)