; RUN: opt < %s -simplifycfg -S | FileCheck %s ; Check if the debug info for hoisted store for "ret = 0" is removed ; ; int foo(int x) { ; int ret = 1; ; if (x) ; ret = 0; ; return ret; ; } ; ; CHECK: store i32 1,{{.+}}!dbg ![[DLOC1:[0-9]+]] ; CHECK: icmp ne {{.+}}!dbg ![[DLOC2:[0-9]+]] ; CHECK: [[VREG:%[^ ]+]] = select ; CHECK: store i32 [[VREG]] ; CHECK-NOT: !dbg ; CHECK-SAME: {{$}} ; CHECK: ret {{.+}}!dbg ![[DLOC3:[0-9]+]] ; CHECK: ![[DLOC1]] = !DILocation(line: 2 ; CHECK: ![[DLOC2]] = !DILocation(line: 3 ; CHECK: ![[DLOC3]] = !DILocation(line: 5 target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: noinline nounwind uwtable define i32 @foo(i32) !dbg !6 { %2 = alloca i32, align 4 %3 = alloca i32, align 4 store i32 %0, i32* %2, align 4 store i32 1, i32* %3, align 4, !dbg !14 %4 = load i32, i32* %2, align 4, !dbg !15 %5 = icmp ne i32 %4, 0, !dbg !15 br i1 %5, label %6, label %7, !dbg !17 ;