1 ; RUN: opt -disable-output -debugify-each -passes=gvn < %s 2>&1 | FileCheck %s
2 ; RUN: opt --experimental-debuginfo-iterators=false -disable-output -debugify-each -passes=gvn < %s 2>&1 | FileCheck %s
4 ; CHECK-NOT: ERROR: Instruction with empty DebugLoc in function _Z3bazv -- {{%.*}} = phi
5 ; CHECK: CheckFunctionDebugify [GVNPass]: PASS
7 @foo = dso_local local_unnamed_addr global i32 0, align 4
10 define dso_local void @_Z3bazv() local_unnamed_addr #0 {
14 for.cond.loopexit.loopexit: ; preds = %for.inc
15 br label %for.cond.loopexit
17 for.cond.loopexit: ; preds = %for.cond.loopexit.loopexit, %for.cond
20 for.cond: ; preds = %for.cond.loopexit, %entry
21 %.pr = load i32, ptr @foo, align 4
22 %tobool1 = icmp eq i32 %.pr, 0
23 br i1 %tobool1, label %for.cond.loopexit, label %for.inc.preheader
25 for.inc.preheader: ; preds = %for.cond
28 for.inc: ; preds = %for.inc.preheader, %for.inc
29 %val = load i8, ptr @x
30 %conv = sext i8 %val to i32
31 store i32 %conv, ptr @foo, align 4
32 %tobool = icmp eq i8 %val, 0
33 br i1 %tobool, label %for.cond.loopexit.loopexit, label %for.inc
36 declare dso_local signext i8 @_Z3barv() local_unnamed_addr #1