• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -licm -loop-unroll < %s
2;
3; This test contains a carefully rotated set of three nested loops. The middle
4; loop can be unrolled leaving one copy of the inner loop inside the outer
5; loop. Because of how LICM works, when this middle loop is unrolled and
6; removed, its alias set tracker is destroyed and no longer available when LICM
7; runs on the outer loop.
8
9define void @f() {
10entry:
11  br label %l1
12
13l2.l1.loopexit_crit_edge:
14  br label %l1.loopexit
15
16l1.loopexit:
17  br label %l1.backedge
18
19l1:
20  br i1 undef, label %l1.backedge, label %l2.preheader
21
22l1.backedge:
23  br label %l1
24
25l2.preheader:
26  br i1 true, label %l1.loopexit, label %l3.preheader.lr.ph
27
28l3.preheader.lr.ph:
29  br label %l3.preheader
30
31l2.loopexit:
32  br i1 true, label %l2.l1.loopexit_crit_edge, label %l3.preheader
33
34l3.preheader:
35  br label %l3
36
37l3:
38  br i1 true, label %l3, label %l2.loopexit
39}
40