• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2
3@last = external global [65 x i32*]
4
5define i32 @NextRootMove(i32 %wtm, i32 %x, i32 %y, i32 %z) {
6entry:
7        %A = alloca i32*
8	%tmp17618 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
9        store i32* %tmp17618, i32** %A
10; CHECK: entry:
11; CHECK-NEXT: alloca i32
12; CHECK-NEXT: %tmp17618 = load
13; CHECK-NOT: load
14; CHECK-NOT: phi
15	br label %cond_true116
16
17cond_true116:
18   %cmp = icmp eq i32 %x, %y
19	br i1 %cmp, label %cond_true128, label %cond_true145
20
21cond_true128:
22	%tmp17625 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
23        store i32* %tmp17625, i32** %A
24   %cmp1 = icmp eq i32 %x, %z
25	br i1 %cmp1 , label %bb98.backedge, label %return.loopexit
26
27bb98.backedge:
28	br label %cond_true116
29
30cond_true145:
31	%tmp17631 = load i32*, i32** getelementptr ([65 x i32*], [65 x i32*]* @last, i32 0, i32 1), align 4
32        store i32* %tmp17631, i32** %A
33	br i1 false, label %bb98.backedge, label %return.loopexit
34
35return.loopexit:
36	br label %return
37
38return:
39	ret i32 0
40}
41