blob: d9cd67406b06c9695836a7e2f11c869fdd22b1cc [file] [log] [blame]
Chris Lattner40acfe32002-05-03 19:58:17 +00001; 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
Chris Lattner07a52182002-08-14 19:28:09 +00005; Fix #2: The unary not instruction now no longer exists. Change to xor.
6
Dan Gohman18800922009-09-11 18:01:28 +00007; RUN: opt < %s -constprop -S | \
Tanya Lattner5640bd12008-03-01 09:15:35 +00008; RUN: not grep {i32 0}
Chris Lattner40acfe32002-05-03 19:58:17 +00009
Tanya Lattner5640bd12008-03-01 09:15:35 +000010define i32 @test1() {
11 %R = xor i32 123, -1 ; <i32> [#uses=1]
12 ret i32 %R
Chris Lattner40acfe32002-05-03 19:58:17 +000013}
14
Tanya Lattner5640bd12008-03-01 09:15:35 +000015define i32 @test2() {
16 %R = xor i32 -123, -1 ; <i32> [#uses=1]
17 ret i32 %R
Chris Lattner40acfe32002-05-03 19:58:17 +000018}
Tanya Lattner5640bd12008-03-01 09:15:35 +000019