• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4---
5name:            test_scalar_or_small
6body: |
7  bb.0:
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)
17    %0:_(s64) = COPY $x0
18    %1:_(s64) = COPY $x1
19    %2:_(s8) = G_TRUNC %0
20    %3:_(s8) = G_TRUNC %1
21    %4:_(s8) = G_OR %2, %3
22    %5:_(s64) = G_ANYEXT %4
23    $x0 = COPY %5
24...
25
26---
27name:            test_big_scalar_power_of_2
28body: |
29  bb.0:
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.
34
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
45    %0:_(s64) = COPY $x0
46    %1:_(s64) = COPY $x1
47    %2:_(s64) = COPY $x2
48    %3:_(s64) = COPY $x3
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
53    $x0 = COPY %7
54    $x1 = COPY %8
55    RET_ReallyLR implicit $x0, implicit $x1
56...
57