Chris Lattner | 128cf79 | 2003-08-17 19:29:34 +0000 | [diff] [blame^] | 1 | ; This test checks to make sure that 'br X, Dest, Dest' is folded into |
2 | ; 'br Dest' | ||||
3 | |||||
4 | ; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2' | ||||
5 | |||||
6 | declare void %noop() | ||||
7 | |||||
8 | int %test(bool %c1, bool %c2) { | ||||
9 | call void %noop() | ||||
10 | br bool %c1, label %A, label %Y | ||||
11 | A: | ||||
12 | call void %noop() | ||||
13 | br bool %c2, label %X, label %X ; Can be converted to unconditional br | ||||
14 | X: | ||||
15 | call void %noop() | ||||
16 | ret int 0 | ||||
17 | Y: | ||||
18 | call void %noop() | ||||
19 | br label %X | ||||
20 | } |