brintos

brintos / llvm-project-archived public Read only

0
0
Text · 960 B · 750a32e Raw
29 lines · plain
1; RUN: opt < %s -passes=lcssa -S | FileCheck %s2; RUN: opt < %s -passes=debugify,lcssa -S | FileCheck -check-prefix=DEBUGIFY %s3 4define void @lcssa(i1 %S2) {5; CHECK-LABEL: @lcssa6entry:7	br label %loop.interior8loop.interior:		; preds = %post.if, %entry9	br i1 %S2, label %if.true, label %if.false10if.true:		; preds = %loop.interior11	%X1 = add i32 0, 0		; <i32> [#uses=1]12	br label %post.if13if.false:		; preds = %loop.interior14	%X2 = add i32 0, 1		; <i32> [#uses=1]15	br label %post.if16post.if:		; preds = %if.false, %if.true17	%X3 = phi i32 [ %X1, %if.true ], [ %X2, %if.false ]		; <i32> [#uses=1]18	br i1 %S2, label %loop.exit, label %loop.interior19loop.exit:		; preds = %post.if20; CHECK: %X3.lcssa = phi i3221; DEBUGIFY: %X3.lcssa = phi i32 {{.*}}, !dbg ![[DbgLoc:[0-9]+]]22; CHECK: %X4 = add i32 3, %X3.lcssa23	%X4 = add i32 3, %X3		; <i32> [#uses=0]24	ret void25}26 27; Make sure the lcssa phi has %X3's debug location28; DEBUGIFY: ![[DbgLoc]] = !DILocation(line: 729