blob: 433b078025b0f8a8844c4f8787081d4dee1926d4 [file] [log] [blame]
Chris Lattneref47a502003-06-22 20:32:35 +00001; This test checks to make sure phi nodes are updated properly
2;
Misha Brukmanedf4bab2003-09-16 15:29:54 +00003; RUN: llvm-as < %s | opt -tailduplicate -disable-output
Chris Lattneref47a502003-06-22 20:32:35 +00004
5
6
7int %test(bool %c, int %X, int %Y) {
8 br label %L
9
10L:
11 %A = add int %X, %Y
12 br bool %c, label %T, label %F
13
14F:
15 br bool %c, label %L, label %T
16
17T:
18 %V = phi int [%A, %L], [0, %F]
19 ret int %V
20}