blob: 178467d83ec6671a20703e0aceabd9bd790603cc [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; This is a basic sanity check for constant propogation. The add instruction
2; should be eliminated.
3
4; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep add
5
6int %test(bool %B) {
7 br bool %B, label %BB1, label %BB2
8BB1:
9 %Val = add int 0, 0
10 br label %BB3
11BB2:
12 br label %BB3
13BB3:
14 %Ret = phi int [%Val, %BB1], [1, %BB2]
15 ret int %Ret
16}