• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: asserts
2; RUN: llc %s -mtriple=lanai-unknown-unknown -debug-only=machine-scheduler -o /dev/null 2>&1 | FileCheck %s
3
4; Make sure there are no control dependencies between memory operations that
5; are trivially disjoint.
6
7; Function Attrs: norecurse nounwind uwtable
8define i32 @foo(i8* inreg nocapture %x) {
9entry:
10  %0 = bitcast i8* %x to i32*
11  store i32 1, i32* %0, align 4
12  %arrayidx1 = getelementptr inbounds i8, i8* %x, i32 4
13  %1 = bitcast i8* %arrayidx1 to i32*
14  store i32 2, i32* %1, align 4
15  %arrayidx2 = getelementptr inbounds i8, i8* %x, i32 12
16  %2 = bitcast i8* %arrayidx2 to i32*
17  %3 = load i32, i32* %2, align 4
18  %arrayidx3 = getelementptr inbounds i8, i8* %x, i32 10
19  %4 = bitcast i8* %arrayidx3 to i16*
20  store i16 3, i16* %4, align 2
21  %5 = bitcast i8* %arrayidx2 to i16*
22  store i16 4, i16* %5, align 2
23  %arrayidx5 = getelementptr inbounds i8, i8* %x, i32 14
24  store i8 5, i8* %arrayidx5, align 1
25  %arrayidx6 = getelementptr inbounds i8, i8* %x, i32 15
26  store i8 6, i8* %arrayidx6, align 1
27  %arrayidx7 = getelementptr inbounds i8, i8* %x, i32 16
28  store i8 7, i8* %arrayidx7, align 1
29  ret i32 %3
30}
31
32; CHECK-LABEL: foo
33; CHECK-LABEL: SU({{.*}}):   SW_RI{{.*}}, 0,
34; CHECK:  # preds left       : 2
35; CHECK:  # succs left       : 0
36; CHECK-LABEL: SU({{.*}}):   SW_RI{{.*}}, 4,
37; CHECK:  # preds left       : 2
38; CHECK:  # succs left       : 0
39; CHECK-LABEL: SU({{.*}}):   %{{.*}} = LDW_RI{{.*}}, 12,
40; CHECK:  # preds left       : 1
41; CHECK:  # succs left       : 4
42; CHECK-LABEL: SU({{.*}}):   STH_RI{{.*}}, 10,
43; CHECK:  # preds left       : 2
44; CHECK:  # succs left       : 0
45; CHECK-LABEL: SU({{.*}}):   STH_RI{{.*}}, 12,
46; CHECK:  # preds left       : 3
47; CHECK:  # succs left       : 0
48; CHECK-LABEL: SU({{.*}}):   STB_RI{{.*}}, 14,
49; CHECK:  # preds left       : 3
50; CHECK:  # succs left       : 0
51; CHECK-LABEL: SU({{.*}}):   STB_RI{{.*}}, 15,
52; CHECK:  # preds left       : 3
53; CHECK:  # succs left       : 0
54; CHECK-LABEL: SU({{.*}}):   STB_RI{{.*}}, 16,
55; CHECK:  # preds left       : 2
56; CHECK:  # succs left       : 0
57