Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; This test ensures that the simplifycfg pass continues to constant fold |
2 | ; terminator instructions. | ||||
3 | |||||
4 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | not grep br | ||||
5 | |||||
6 | int %test(int %A, int %B) { | ||||
7 | J: | ||||
8 | %C = add int %A, 12 | ||||
9 | br bool true, label %L, label %K ; K is dead! | ||||
10 | L: | ||||
11 | %D = add int %C, %B | ||||
12 | ret int %D | ||||
13 | K: | ||||
14 | %E = add int %C, %B | ||||
15 | ret int %E | ||||
16 | } |