Eliminate some Tclisms.
[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: llvm-as < %s | opt -constprop | llvm-dis | \
8 ; RUN:   not grep {i32 0}
9
10 define i32 @test1() {
11         %R = xor i32 123, -1            ; <i32> [#uses=1]
12         ret i32 %R
13 }
14
15 define i32 @test2() {
16         %R = xor i32 -123, -1           ; <i32> [#uses=1]
17         ret i32 %R
18 }
19