1 # RUN: llc -run-pass=aarch64-ldst-opt -o - -mtriple=aarch64-- %s | FileCheck %s
2 # Check that we merge the MIFlags from both the instructions in the final
6 # CHECK-LABEL: name: case11
9 frame-setup STRWui $w1, $x0, 1 :: (store 4)
10 $w1 = frame-destroy LDRWui $x0, 1 :: (load 4)
12 ; CHECK: frame-setup STRWui
13 ; CHECK-NOT: frame-setup
14 ; CHECK-NEXT: frame-destroy ORRWrs
15 ; No merging happening here, make sure we keep the flags of the previous
22 # CHECK-LABEL: name: case12
25 frame-setup STRWui $w1, $x0, 1 :: (store 4)
26 $w2 = frame-destroy LDRHHui $x0, 2 :: (load 2)
28 ; CHECK: frame-setup STRWui
29 ; CHECK-NOT: frame-setup
30 ; CHECK-NEXT: frame-destroy ANDWri
31 ; No merging happening here, make sure we keep the flags of the previous
38 # CHECK-LABEL: name: case13
41 frame-setup STRWui $w1, $x0, 1 :: (store 4)
42 $w2 = frame-destroy LDRHHui $x0, 3 :: (load 2)
44 ; CHECK: frame-setup STRWui
45 ; CHECK-NOT: frame-setup
46 ; CHECK-NEXT: frame-destroy UBFMWri
47 ; No merging happening here, make sure we keep the flags of the previous
54 # CHECK-LABEL: name: case2
57 frame-setup STRHHui $wzr, $x0, 0 :: (store 4)
58 frame-destroy STRHHui $wzr, $x0, 1 :: (store 4)
60 ; CHECK: frame-setup frame-destroy STRWui
66 # CHECK-LABEL: name: case3
70 $x0 = frame-setup LDRXui $x2, 0 :: (load 8)
71 $x1 = frame-destroy LDRXui $x2, 1 :: (load 8)
73 ; CHECK: frame-setup frame-destroy LDPXi
78 # CHECK-LABEL: name: case4
81 $x26, $x25 = frame-setup LDPXi $sp, 0
82 $sp = frame-destroy ADDXri $sp, 64, 0
84 ; CHECK: = frame-setup frame-destroy LDPXpost
90 # CHECK-LABEL: name: case41
93 $x26 = frame-setup LDRXui $sp, 0
94 $sp = frame-destroy ADDXri $sp, 64, 0
96 ; CHECK: = frame-setup frame-destroy LDRXpost