• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -disable-output -debugify-each -passes=gvn < %s 2>&1 | FileCheck %s
2
3; CHECK-NOT: ERROR: Instruction with empty DebugLoc in function _Z3bazv --  {{%.*}} = phi
4; CHECK: CheckFunctionDebugify [GVN]: PASS
5
6@foo = dso_local local_unnamed_addr global i32 0, align 4
7@x = global i8 17
8
9define dso_local void @_Z3bazv() local_unnamed_addr #0 {
10entry:
11  br label %for.cond
12
13for.cond.loopexit.loopexit:                       ; preds = %for.inc
14  br label %for.cond.loopexit
15
16for.cond.loopexit:                                ; preds = %for.cond.loopexit.loopexit, %for.cond
17  br label %for.cond
18
19for.cond:                                         ; preds = %for.cond.loopexit, %entry
20  %.pr = load i32, i32* @foo, align 4
21  %tobool1 = icmp eq i32 %.pr, 0
22  br i1 %tobool1, label %for.cond.loopexit, label %for.inc.preheader
23
24for.inc.preheader:                                ; preds = %for.cond
25  br label %for.inc
26
27for.inc:                                          ; preds = %for.inc.preheader, %for.inc
28  %val = load i8, i8* @x
29  %conv = sext i8 %val to i32
30  store i32 %conv, i32* @foo, align 4
31  %tobool = icmp eq i8 %val, 0
32  br i1 %tobool, label %for.cond.loopexit.loopexit, label %for.inc
33}
34
35declare dso_local signext i8 @_Z3barv() local_unnamed_addr #1
36