summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/ldst-opt.mir
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/AArch64/ldst-opt.mir')
-rw-r--r--llvm/test/CodeGen/AArch64/ldst-opt.mir19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/ldst-opt.mir b/llvm/test/CodeGen/AArch64/ldst-opt.mir
index 5b3576d898e..9cb9528cc62 100644
--- a/llvm/test/CodeGen/AArch64/ldst-opt.mir
+++ b/llvm/test/CodeGen/AArch64/ldst-opt.mir
@@ -162,3 +162,22 @@ body: |
# CHECK: UBFMWri undef %w1
# CHECK: STRHHui undef %w3
# CHECK: ANDWri undef %w3
+---
+name: promote-load-from-store-trivial-kills
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: %x0, %lr
+
+ STRXui %x0, %sp, 0 :: (store 8)
+ STRXui killed %x0, %sp, 2 :: (store 8)
+ %x0 = LDRXui %sp, 0 :: (load 8)
+ BL $bar, csr_aarch64_aapcs, implicit-def %lr, implicit %sp, implicit %x0, implicit-def %sp
+ RET %lr
+...
+# CHECK-LABEL: name: promote-load-from-store-trivial-kills
+# CHECK: STRXui %x0, %sp, 0
+# CHECK: STRXui %x0, %sp, 2
+# CHECK-NOT: LDRXui
+# CHECK-NOT: ORR
+# CHECK: BL $bar, csr_aarch64_aapcs, implicit-def %lr, implicit %sp, implicit %x0, implicit-def %sp
OpenPOWER on IntegriCloud