blob: e2c7d5b24df49ca81d4ae86c8456d355194af041 [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
Misha Brukmane78760e2003-09-16 15:29:54 +00004; RUN: llvm-as < %s | 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}