1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# RUN: llc -run-pass=aarch64-ldst-opt -o - -mtriple=aarch64-- %s | FileCheck %s
# Check that we merge the MIFlags from both the instructions in the final
# instruction.
---
name: case11
# CHECK-LABEL: name: case11
body: |
bb.0:
frame-setup STRWui $w1, $x0, 1 :: (store 4)
$w1 = frame-destroy LDRWui $x0, 1 :: (load 4)
; CHECK: frame-setup STRWui
; CHECK-NOT: frame-setup
; CHECK-NEXT: frame-destroy ORRWrs
; No merging happening here, make sure we keep the flags of the previous
; instruction.
RET_ReallyLR
...
---
name: case12
# CHECK-LABEL: name: case12
body: |
bb.0:
frame-setup STRWui $w1, $x0, 1 :: (store 4)
$w2 = frame-destroy LDRHHui $x0, 2 :: (load 2)
; CHECK: frame-setup STRWui
; CHECK-NOT: frame-setup
; CHECK-NEXT: frame-destroy ANDWri
; No merging happening here, make sure we keep the flags of the previous
; instruction.
RET_ReallyLR
...
---
name: case13
# CHECK-LABEL: name: case13
body: |
bb.0:
frame-setup STRWui $w1, $x0, 1 :: (store 4)
$w2 = frame-destroy LDRHHui $x0, 3 :: (load 2)
; CHECK: frame-setup STRWui
; CHECK-NOT: frame-setup
; CHECK-NEXT: frame-destroy UBFMWri
; No merging happening here, make sure we keep the flags of the previous
; instruction.
RET_ReallyLR
...
---
name: case2
# CHECK-LABEL: name: case2
body: |
bb.0:
frame-setup STRHHui $wzr, $x0, 0 :: (store 4)
frame-destroy STRHHui $wzr, $x0, 1 :: (store 4)
; CHECK: frame-setup frame-destroy STRWui
RET_ReallyLR
...
---
name: case3
# CHECK-LABEL: name: case3
body: |
bb.0:
$x0 = frame-setup LDRXui $x2, 0 :: (load 8)
$x1 = frame-destroy LDRXui $x2, 1 :: (load 8)
; CHECK: frame-setup frame-destroy LDPXi
RET_ReallyLR
...
---
name: case4
# CHECK-LABEL: name: case4
body: |
bb.0:
$x26, $x25 = frame-setup LDPXi $sp, 0
$sp = frame-destroy ADDXri $sp, 64, 0
; CHECK: = frame-setup frame-destroy LDPXpost
RET_ReallyLR
...
---
name: case41
# CHECK-LABEL: name: case41
body: |
bb.0:
$x26 = frame-setup LDRXui $sp, 0
$sp = frame-destroy ADDXri $sp, 64, 0
; CHECK: = frame-setup frame-destroy LDRXpost
RET_ReallyLR
...
|