brintos

brintos / llvm-project-archived public Read only

0
0
Text · 753 B · dd1e690 Raw
33 lines · plain
1; RUN: opt < %s -passes='lcssa,loop-mssa(licm)' -S | FileCheck %s2; PR304543target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6declare i8 @bar()7 8; Test that we preserve LCSSA form when removing edges from unreachable blocks.9; CHECK-LABEL: @foo10define void @foo(i1 %arg) {11entry:12  br label %for.cond13 14for.cond:15  %x = phi i8 [ undef, %entry ], [ %y, %for.latch ]16  br i1 %arg, label %for.latch, label %exit17 18; CHECK:      unreachable.bb:19; CHECK-NEXT:   unreachable20unreachable.bb:21  br i1 %arg, label %exit, label %for.latch22 23for.latch:24  %y = call i8 @bar()25  br label %for.cond26 27; CHECK:      exit:28; CHECK-NEXT:   %x.lcssa = phi i8 [ %x, %for.cond ]29exit:30  %z = zext i8 %x to i3231  ret void32}33