Chris Lattner | b6e2b7e | 2005-09-19 23:48:04 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' |
| 2 | declare void %f1() |
| 3 | declare void %f2() |
| 4 | declare void %f3() |
| 5 | declare void %f4() |
| 6 | |
| 7 | implementation |
| 8 | |
| 9 | int %test2(int %X, bool %D) { |
| 10 | E: |
| 11 | %C = seteq int %X, 0 |
| 12 | br bool %C, label %T, label %F |
| 13 | T: |
| 14 | %P = phi bool [true, %E], [%C, %A] |
| 15 | br bool %P, label %B, label %A |
| 16 | A: |
| 17 | call void %f1() |
| 18 | br bool %D, label %T, label %F |
| 19 | B: |
| 20 | call void %f2() |
| 21 | ret int 345 |
| 22 | F: |
| 23 | call void %f3() |
| 24 | ret int 123 |
| 25 | } |
| 26 | |