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