• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -run-pass=aarch64-expand-pseudo -mtriple=arm64-apple-darwin -o - %s | FileCheck %s
2
3# Check that we preserve renamble when expanding MOVi32imm/MOVi64imm.
4#
5---
6# CHECK-LABEL:  name: test_i32
7# CHECK-LABEL:  bb.0:
8# CHECK-NEXT:     $sp = frame-setup SUBXri $sp, 32, 0
9# CHECK-NEXT:     renamable $w8 = MOVZWi 4, 0
10# CHECK-NEXT:     STRWui killed renamable $w8, $sp, 0
11# CHECK-NEXT:     $w8 = MOVZWi 45926, 0
12# CHECK-NEXT:     $w8 = MOVKWi $w8, 102, 16
13# CHECK-NEXT:     STRWui killed renamable $w8, $sp, 1
14# CHECK-NEXT:     renamable $w8 = MOVZWi 10319, 0
15# CHECK-NEXT:     renamable $w8 = MOVKWi $w8, 2942, 16
16# CHECK-NEXT:     STRWui killed renamable $w8, $sp, 2
17# CHECK-NEXT:     renamable $w8 = MOVZWi 30600, 0
18# CHECK-NEXT:     renamable $w8 = MOVKWi $w8, 21862, 16
19# CHECK-NEXT:     STRWui killed renamable $w8, $sp, 3
20# CHECK-NEXT:     $sp = frame-destroy ADDXri $sp, 32, 0
21# CHECK-NEXT:     RET undef $lr
22#
23name:           test_i32
24alignment:       8
25tracksRegLiveness: true
26frameInfo:
27  stackSize:       32
28  maxAlignment:    4
29  maxCallFrameSize: 0
30  localFrameSize:  24
31stack:
32  - { id: 0, offset: -4, size: 4, alignment: 4, local-offset: -4 }
33  - { id: 1, offset: -8, size: 4, alignment: 4, local-offset: -8 }
34  - { id: 2, offset: -12, size: 4, alignment: 4, local-offset: -12 }
35  - { id: 3, offset: -16, size: 4, alignment: 4, local-offset: -16 }
36machineFunctionInfo: {}
37body:             |
38  bb.0:
39    $sp = frame-setup SUBXri $sp, 32, 0
40    renamable $w8 = MOVi32imm 4
41    STRWui killed renamable $w8, $sp, 0
42    $w8 = MOVi32imm 6730598
43    STRWui killed renamable $w8, $sp, 1
44    renamable $w8 = MOVi32imm 192817231
45    STRWui killed renamable $w8, $sp, 2
46    renamable $w8 = MOVi32imm 1234605616436508552
47    STRWui killed renamable $w8, $sp, 3
48    $sp = frame-destroy ADDXri $sp, 32, 0
49    RET_ReallyLR
50
51...
52---
53# CHECK-LABEL:  name: test_i64
54# CHECK-LABEL:  bb.0:
55# CHECK-NEXT:     $sp = frame-setup SUBXri $sp, 32, 0
56# CHECK-NEXT:     renamable $x8 = MOVZXi 4, 0
57# CHECK-NEXT:     STRXui killed renamable $x8, $sp, 0
58# CHECK-NEXT:     $x8 = MOVZXi 45926, 0
59# CHECK-NEXT:     $x8 = MOVKXi $x8, 102, 16
60# CHECK-NEXT:     STRXui killed renamable $x8, $sp, 1
61# CHECK-NEXT:     renamable $x8 = MOVNXi 25166, 0
62# CHECK-NEXT:     renamable $x8 = MOVKXi $x8, 55686, 16
63# CHECK-NEXT:     renamable $x8 = MOVKXi $x8, 63160, 32
64# CHECK-NEXT:     STRXui killed renamable $x8, $sp, 2
65# CHECK-NEXT:     renamable $x8 = MOVZXi 30600, 0
66# CHECK-NEXT:     renamable $x8 = MOVKXi $x8, 21862, 16
67# CHECK-NEXT:     renamable $x8 = MOVKXi $x8, 13124, 32
68# CHECK-NEXT:     renamable $x8 = MOVKXi $x8, 4386, 48
69# CHECK-NEXT:     STRXui killed renamable $x8, $sp, 3
70# CHECK-NEXT:     $sp = frame-destroy ADDXri $sp, 32, 0
71# CHECK-NEXT:     RET undef $lr
72#
73name:           test_i64
74alignment:       8
75tracksRegLiveness: true
76frameInfo:
77  stackSize:       32
78  maxAlignment:    4
79  maxCallFrameSize: 0
80  localFrameSize:  32
81stack:
82  - { id: 0, offset: -8, size: 8, alignment: 4, local-offset: -8 }
83  - { id: 1, offset: -16, size: 8, alignment: 4, local-offset: -16 }
84  - { id: 2, offset: -24, size: 8, alignment: 4, local-offset: -24}
85  - { id: 3, offset: -32, size: 8, alignment: 4, local-offset: -32 }
86machineFunctionInfo: {}
87body:             |
88  bb.0:
89    $sp = frame-setup SUBXri $sp, 32, 0
90    renamable $x8 = MOVi64imm 4
91    STRXui killed renamable $x8, $sp, 0
92    $x8 = MOVi64imm 6730598
93    STRXui killed renamable $x8, $sp, 1
94    renamable $x8 = MOVi64imm -10201192817231
95    STRXui killed renamable $x8, $sp, 2
96    renamable $x8 = MOVi64imm 1234605616436508552
97    STRXui killed renamable $x8, $sp, 3
98    $sp = frame-destroy ADDXri $sp, 32, 0
99    RET_ReallyLR
100
101...
102---
103