New testcase
[oota-llvm.git] / test / Transforms / ConstProp / 2002-05-03-NotOperator.ll
1 ; This bug has to do with the fact that constant propogation was implemented in
2 ; terms of _logical_ not (! in C) instead of _bitwise_ not (~ in C).  This was
3 ; due to a spec change.
4
5 ; Fix #2: The unary not instruction now no longer exists. Change to xor.
6
7 ; RUN: if as < %s | opt -constprop | dis | grep 'int 0'
8 ; RUN: then exit 1
9 ; RUN: else exit 0
10 ; RUN: fi
11
12 int "test1"() {
13         %R = xor int 123, -1
14         ret int %R
15 }
16
17 int "test2"() {
18         %R = xor int -123, -1
19         ret int %R
20 }