2002-05-03-NotOperator.ll 523 B

12345678910111213141516171819
  1. ; This bug has to do with the fact that constant propagation 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. ; Fix #2: The unary not instruction now no longer exists. Change to xor.
  5. ; RUN: opt < %s -constprop -S | \
  6. ; RUN: not grep "i32 0"
  7. define i32 @test1() {
  8. %R = xor i32 123, -1 ; <i32> [#uses=1]
  9. ret i32 %R
  10. }
  11. define i32 @test2() {
  12. %R = xor i32 -123, -1 ; <i32> [#uses=1]
  13. ret i32 %R
  14. }