xref: /llvm-project/llvm/test/CodeGen/AArch64/arm64-csldst-mmo.ll (revision 5ddce70ef0e5a641d7fea95e31fc5e2439cb98cb)
1; REQUIRES: asserts
2; RUN: llc < %s -mtriple=arm64-linux-gnu -mcpu=cortex-a57 -enable-misched=0 -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s
3; REQUIRES: asserts
4
5@G = external dso_local global [0 x i32], align 4
6
7; Check that MMOs are added to epilogue calle-save restore loads so
8; that the store to G is not considered dependant on the callee-save
9; loads.
10;
11; CHECK: Before post-MI-sched:
12; CHECK-LABEL: # Machine code for function test1:
13; CHECK: SU(2):   STRWui $wzr
14; CHECK: SU(3):   $x21, $x20 = frame-destroy LDPXi $sp, 2
15; CHECK:  Predecessors:
16; CHECK-NEXT:   SU(0): Out
17; CHECK-NEXT:   SU(0): Out
18; CHECK-NEXT:   SU(0): Ord
19; CHECK-NEXT:  Successors:
20define void @test1() {
21entry:
22  tail call void asm sideeffect "nop", "~{x20},~{x21},~{x22},~{x23}"() nounwind
23  store i32 0, ptr @G, align 4
24  ret void
25}
26