• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -x mir -mtriple aarch64-apple-ios -run-pass mir-namer -mir-vreg-namer-use-stable-hash -verify-machineinstrs -o - < %s | FileCheck %s
2
3---
4name: foo
5body:             |
6  bb.0:
7
8    ;CHECK-LABEL: bb.0
9    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:_(p0) = COPY $d0
10    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:_(<4 x s32>) = COPY $q0
11    ;CHECK-NEXT: G_STORE %bb0_{{[0-9]+}}__1(<4 x s32>), %bb0_{{[0-9]+}}__1(p0) :: (store 16)
12
13    liveins: $q0, $d0
14    %1:fpr(p0) = COPY $d0
15    %0:fpr(<4 x s32>) = COPY $q0
16    G_STORE %0(<4 x s32>), %1(p0) :: (store 16)
17...
18---
19name: bar
20stack:
21  - { id: 0, type: default, offset: 0, size: 4, alignment: 4,
22      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
23      local-offset: -4, debug-info-variable: '', debug-info-expression: '',
24      debug-info-location: '' }
25body:             |
26  bb.0:
27
28    ;CHECK-LABEL: bb.0
29    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = LDRWui
30    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 1
31    ;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = LDRWui
32    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 2
33    ;CHECK-NEXT: %bb0_{{[0-9]+}}__3:gpr32 = LDRWui
34    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 3
35    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = nsw ADDWrr
36    ;CHECK-NEXT: %bb0_{{[0-9]+}}__4:gpr32 = LDRWui
37    ;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = nsw ADDWrr
38    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 4
39    ;CHECK-NEXT: %bb0_{{[0-9]+}}__3:gpr32 = nsw ADDWrr
40    ;CHECK-NEXT: %bb0_{{[0-9]+}}__5:gpr32 = LDRWui
41    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 5
42
43    %0:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
44    %1:gpr32 = MOVi32imm 1
45    %2:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
46    %3:gpr32 = MOVi32imm 2
47    %4:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
48    %5:gpr32 = MOVi32imm 3
49    %10:gpr32 = nsw ADDWrr %0:gpr32, %1:gpr32
50    %6:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
51    %11:gpr32 = nsw ADDWrr %2:gpr32, %3:gpr32
52    %7:gpr32 = MOVi32imm 4
53    %12:gpr32 = nsw ADDWrr %4:gpr32, %5:gpr32
54    %8:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
55    %9:gpr32 = MOVi32imm 5
56    %13:gpr32 = nsw ADDWrr %6:gpr32, %7:gpr32
57    %14:gpr32 = nsw ADDWrr %8:gpr32, %9:gpr32
58    %15:gpr32 = nsw ADDWrr %10:gpr32, %11:gpr32
59    %16:gpr32 = nsw ADDWrr %12:gpr32, %13:gpr32
60    %17:gpr32 = nsw ADDWrr %14:gpr32, %15:gpr32
61    %18:gpr32 = nsw ADDWrr %16:gpr32, %17:gpr32
62    $w0 = COPY %18
63    RET_ReallyLR implicit $w0
64...
65---
66name: baz
67stack:
68  - { id: 0, type: default, offset: 0, size: 4, alignment: 4,
69      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
70      local-offset: -4, debug-info-variable: '', debug-info-expression: '',
71      debug-info-location: '' }
72body:             |
73  bb.0:
74    liveins: $x0, $x1, $d0, $d1
75
76    ;CHECK-LABEL: bb.0:
77    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = LDRWui %stack.0, 0
78    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = COPY %bb0_{{[0-9]+}}__1
79    ;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = COPY %bb0_{{[0-9]+}}__1
80    ;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = COPY %bb0_{{[0-9]+}}__1
81    ;CHECK-NEXT: $w0 = COPY %bb0_{{[0-9]+}}__2
82
83    %0:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
84    %1:gpr32 = COPY %0
85    %2:gpr32 = COPY %1
86    %3:gpr32 = COPY %2
87    $w0 = COPY %3
88    RET_ReallyLR implicit $w0
89...
90
91