1 ; RUN: opt -basicaa -gvn -S < %s | FileCheck %s
3 target datalayout = "e-p:64:64:64"
6 ; CHECK: entry.end_crit_edge:
7 ; CHECK: %n.pre = load i32* %q.phi.trans.insert
11 ; CHECK: %n = phi i32 [ %n.pre, %entry.end_crit_edge ], [ %z, %then ]
14 @G = external global [100 x i32]
15 define i32 @foo(i32 %x, i32 %z) {
17 %tobool = icmp eq i32 %x, 0
18 br i1 %tobool, label %end, label %then
21 %i = sext i32 %x to i64
22 %p = getelementptr [100 x i32]* @G, i64 0, i64 %i
27 %j = sext i32 %x to i64
28 %q = getelementptr [100 x i32]* @G, i64 0, i64 %j