blob: c80c5e4bb5fad7c7cd50b37f4d8e3cce91b49952 [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
Chris Lattner50e86822003-06-28 23:23:34 +00004; RUN: as < %s | opt -constprop -die | 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}