blob: bb6c5fed3bb2d4b7ba506e48c55917738d578cb7 [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
Misha Brukmane78760e2003-09-16 15:29:54 +00004; RUN: llvm-as < %s | opt -simplifycfg | not grep br
Chris Lattner04b9d292002-09-24 16:13:20 +00005
6int %test(int %A, int %B) {
7J:
8 %C = add int %A, 12
9 br bool true, label %L, label %K ; K is dead!
10L:
11 %D = add int %C, %B
12 ret int %D
13K:
14 %E = add int %C, %B
15 ret int %E
16}