• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass aarch64-ldst-opt  -verify-machineinstrs  -o - %s | FileCheck %s
3
4--- |
5  define i1 @no-clobber-zr(i64* %p, i64 %x) { ret i1 0 }
6...
7---
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
11# between stores.
12# CHECK-LABEL: name: no-clobber-zr
13# CHECK: STPXi $xzr, $xzr, $x0, 0
14name: no-clobber-zr
15body: |
16  bb.0:
17    liveins: $x0,  $x1
18    STRXui $xzr, $x0, 0 :: (store 8 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 8 into %ir.p)
22    $w0 = ORRWrs $wzr, killed $w8, 0
23    RET $lr, implicit $w0
24...
25
26
27
28