• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -disable-output -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s
2; RUN: opt -disable-output -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
3@v_274 = external dso_local global i64, align 1
4@v_295 = external dso_local global i16, align 1
5@v_335 = external dso_local global i32, align 1
6
7; CHECK-LABEL: @main()
8; CHECK-NOT: 5 = MemoryPhi(
9; CHECK-NOT: 6 = MemoryPhi(
10; CHECK: 4 = MemoryPhi(
11; CHECK-NOT: 7 = MemoryPhi(
12define dso_local void @main() {
13entry:
14  store i32 undef, i32* @v_335, align 1
15  br i1 undef, label %gate, label %exit
16
17nopredentry1:                                     ; No predecessors!
18  br label %preinfiniteloop
19
20nopredentry2:                                     ; No predecessors!
21  br label %gate
22
23gate:                                             ; preds = %nopredentry2, %entry
24  br i1 undef, label %preinfiniteloop, label %exit
25
26preinfiniteloop:                                  ; preds = %gate, %nopredentry1
27  br label %infiniteloop
28
29infiniteloop:                                     ; preds = %infiniteloop, %preinfiniteloop
30  store i16 undef, i16* @v_295, align 1
31  br label %infiniteloop
32
33exit:                                             ; preds = %gate, %entry
34  store i64 undef, i64* @v_274, align 1
35  ret void
36}
37