1*d4c0abb4SRoman Lebedev; RUN: opt %s -debugify -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s 2cee313d2SEric Christopher; Tests Bug 37966 3cee313d2SEric Christopher 4cee313d2SEric Christopherdefine void @bar(i32 %aa) { 5cee313d2SEric Christopher; CHECK-LABEL: @bar( 6cee313d2SEric Christopher; CHECK: if.end.1.critedge: 7cee313d2SEric Christopher; CHECK: br label %if.end.1, !dbg ![[DBG:[0-9]+]] 8cee313d2SEric Christopherentry: 9cee313d2SEric Christopher %aa.addr = alloca i32, align 4 10cee313d2SEric Christopher %bb = alloca i32, align 4 11cee313d2SEric Christopher store i32 %aa, i32* %aa.addr, align 4 12cee313d2SEric Christopher store i32 0, i32* %bb, align 4 13cee313d2SEric Christopher %tobool = icmp ne i32 %aa, 0 14cee313d2SEric Christopher br i1 %tobool, label %if.then, label %if.end 15cee313d2SEric Christopher 16cee313d2SEric Christopherif.then: ; preds = %entry 17cee313d2SEric Christopher call void @foo() 18cee313d2SEric Christopher br label %if.end 19cee313d2SEric Christopher 20cee313d2SEric Christopherif.end: ; preds = %if.then, %entry 21cee313d2SEric Christopher store i32 1, i32* %bb, align 4 22cee313d2SEric Christopher br i1 %tobool, label %if.then.1, label %if.end.1 ; "line 10" to -debugify 23cee313d2SEric Christopher 24cee313d2SEric Christopherif.then.1: ; preds = %if.end 25cee313d2SEric Christopher call void @foo() 26cee313d2SEric Christopher br label %if.end.1 27cee313d2SEric Christopher 28cee313d2SEric Christopherif.end.1: ; preds = %if.then.1, %if.end 29cee313d2SEric Christopher store i32 2, i32* %bb, align 4 30cee313d2SEric Christopher br label %for.end 31cee313d2SEric Christopher 32cee313d2SEric Christopherfor.end: ; preds = %if.end.1 33cee313d2SEric Christopher ret void 34cee313d2SEric Christopher} 35cee313d2SEric Christopher 36cee313d2SEric Christopherdeclare void @foo() 37cee313d2SEric Christopher 38cee313d2SEric Christopher; CHECK: ![[DBG]] = !DILocation(line: 10, 39