Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ |
| 2 | ; RUN: not grep select |
| 3 | |
| 4 | ;; The PHI node in this example should not be turned into a select, as we are |
| 5 | ;; not able to ifcvt the entire block. As such, converting to a select just |
| 6 | ;; introduces inefficiency without saving copies. |
| 7 | |
| 8 | int %bar(bool %C) { |
| 9 | entry: |
| 10 | br bool %C, label %then, label %endif |
| 11 | |
| 12 | then: |
| 13 | %tmp.3 = call int %qux() |
| 14 | br label %endif |
| 15 | |
| 16 | endif: |
| 17 | %R = phi int [123, %entry], [12312, %then] |
| 18 | ;; stuff to disable tail duplication |
| 19 | call int %qux() |
| 20 | call int %qux() |
| 21 | call int %qux() |
| 22 | call int %qux() |
| 23 | call int %qux() |
| 24 | call int %qux() |
| 25 | call int %qux() |
| 26 | ret int %R |
| 27 | } |
| 28 | |
| 29 | declare int %qux() |
| 30 | |