2 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass aarch64-ldst-opt -verify-machineinstrs -o - %s | FileCheck %s
5 define i1 @no-clobber-zr(ptr %p, i64 %x) { ret i1 0 }
8 # Check that write of xzr doesn't inhibit pairing of xzr stores since
9 # it isn't actually clobbered. Written as a MIR test to avoid
10 # schedulers reordering instructions such that SUBS doesn't appear
12 # CHECK-LABEL: name: no-clobber-zr
13 # CHECK: STPXi $xzr, $xzr, $x0, 0
18 STRXui $xzr, $x0, 0 :: (store (s64) into %ir.p)
19 dead $xzr = SUBSXri killed $x1, 0, 0, implicit-def $nzcv
20 $w8 = CSINCWr $wzr, $wzr, 1, implicit killed $nzcv
21 STRXui $xzr, killed $x0, 1 :: (store (s64) into %ir.p)
22 $w0 = ORRWrs $wzr, killed $w8, 0