1 ; The unify-function-exit-nodes pass often makes basic blocks that just contain
2 ; a PHI node and a return. Make sure the simplify cfg can straighten out this
3 ; important case. This is basically the most trivial form of tail-duplication.
5 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
6 ; RUN: not grep {br label}
8 int %test(bool %B, int %A, int %B) {
9 br bool %B, label %T, label %F
15 %X = phi int [%A, %F], [%B, %T]
19 ; Make sure it's willing to move unconditional branches to return instructions
20 ; as well, even if the return block is shared and the source blocks are
22 int %test2(bool %B, int %A, int %B) {
23 br bool %B, label %T, label %F
25 call int %test(bool true, int 5, int 8)
28 call int %test(bool true, int 5, int 8)