blob: d7624dcacfb4ffd57c7165776b25b092f82978c1 [file] [log] [blame]
Chris Lattner1610df22002-05-07 20:32:19 +00001; This is a basic sanity check for constant propogation. The add instruction
2; should be eliminated.
3
Reid Spencer69ccadd2006-12-02 04:23:10 +00004; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep phi
Chris Lattner1610df22002-05-07 20:32:19 +00005
Chris Lattner50e86822003-06-28 23:23:34 +00006int %test(bool %B) {
Chris Lattner1610df22002-05-07 20:32:19 +00007BB0:
8 br bool %B, label %BB1, label %BB3
9BB1:
10 br label %BB3
11BB3:
12 %Ret = phi int [1, %BB0], [1, %BB1]
13 ret int %Ret
Chris Lattner50e86822003-06-28 23:23:34 +000014}