brintos

brintos / llvm-project-archived public Read only

0
0
Text · 828 B · 9b04d45 Raw
33 lines · plain
1; RUN: opt -S -passes=jump-threading < %s | FileCheck %s2 3; CHECK-LABEL: @f(4; CHECK-LABEL: entry5; CHECK-NEXT: ret void6;7; JumpThreading must detect the next two blocks are unreachable from entry8; and leave them alone. A subsequent pass will remove them from @f.9;10; CHECK: for.cond1:11; CHECK-NEXT: phi12; CHECK-NEXT: icmp13; CHECK-NEXT: br i1 %cmp, label %for.body, label %for.cond114; CHECK: for.body:15; CHECK-NEXT: add16; CHECK-NEXT: icmp17; CHECK-NEXT: br i1 %a, label %for.cond1, label %for.cond118 19define void @f() {20entry:21  ret void22 23for.cond1:24  %i.025 = phi i32 [ %inc, %for.body ], [ %inc, %for.body ], [ 1, %for.cond1 ]25  %cmp = icmp slt i32 %i.025, 226  br i1 %cmp, label %for.body, label %for.cond127 28for.body:29  %inc = add nsw i32 %i.025, 030  %a = icmp ugt i32 %inc, 231  br i1 %a, label %for.cond1, label %for.cond132}33