brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 845cf50 Raw
51 lines · plain
1; NOTE: Do not autogenerate2; RUN: opt < %s -fix-irreducible --verify-loop-info -S | FileCheck %s3; RUN: opt < %s -passes='fix-irreducible,verify<loops>' -S | FileCheck %s4; RUN: opt < %s -passes='verify<loops>,fix-irreducible,verify<loops>' -S | FileCheck %s5 6; CHECK-LABEL: @unreachable(7; CHECK: entry:8; CHECK-NOT: irr.guard:9define void @unreachable(i32 %n, i1 %arg) {10entry:11  br label %loop.body12 13loop.body:14  br label %inner.block15 16unreachable.block:17  br label %inner.block18 19inner.block:20  br i1 %arg, label %loop.exit, label %loop.latch21 22loop.latch:23  br label %loop.body24 25loop.exit:26  ret void27}28 29; CHECK-LABEL: @unreachable_callbr(30; CHECK: entry:31; CHECK-NOT: irr.guard:32define void @unreachable_callbr(i32 %n, i1 %arg) {33entry:34  callbr void asm "", ""() to label %loop.body []35 36loop.body:37  callbr void asm "", ""() to label %inner.block []38 39unreachable.block:40  callbr void asm "", ""() to label %inner.block []41 42inner.block:43  callbr void asm "", "r,!i"(i1 %arg) to label %loop.exit [label %loop.latch]44 45loop.latch:46  callbr void asm "", ""() to label %loop.body []47 48loop.exit:49  ret void50}51