mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
a62270de2c
The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
19 lines
423 B
LLVM
19 lines
423 B
LLVM
; RUN: opt < %s -simplifycfg -S | FileCheck %s
|
|
|
|
; Check that we can get rid of empty block leading to header
|
|
; if it does not introduce new edge.
|
|
define i32 @test(i32 %c) {
|
|
entry:
|
|
br label %header
|
|
header:
|
|
%i = phi i32 [0, %entry], [%i.1, %backedge]
|
|
%i.1 = add i32 %i, 1
|
|
%cmp = icmp slt i32 %i.1, %c
|
|
br i1 %cmp, label %backedge, label %exit
|
|
; CHECK-NOT: backedge:
|
|
backedge:
|
|
br label %header
|
|
exit:
|
|
ret i32 %i
|
|
}
|