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-as < %s | opt -simplifycfg | llvm-dis | not grep 'br label'
7 int %test(bool %B, int %A, int %B) {
8 br bool %B, label %T, label %F
14 %X = phi int [%A, %F], [%B, %T]
18 ; Make sure it's willing to move unconditional branches to return instructions
19 ; as well, even if the return block is shared and the source blocks are
21 int %test2(bool %B, int %A, int %B) {
22 br bool %B, label %T, label %F
24 call int %test(bool true, int 5, int 8)
27 call int %test(bool true, int 5, int 8)