blob: 207eaa9a2eb0f854bff47591fb0de4c0197acc59 [file] [log] [blame]
Chris Lattner04b9d292002-09-24 16:13:20 +00001; This test ensures that the simplifycfg pass continues to constant fold
2; terminator instructions.
3
4; RUN: if as < %s | opt -simplifycfg | grep br
5; RUN: then exit 1
6; RUN: else exit 0
7; RUN: fi
8
9int %test(int %A, int %B) {
10J:
11 %C = add int %A, 12
12 br bool true, label %L, label %K ; K is dead!
13L:
14 %D = add int %C, %B
15 ret int %D
16K:
17 %E = add int %C, %B
18 ret int %E
19}