Home | History | Annotate | Download | only in ConstProp
      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 
      5 ; Fix #2: The unary not instruction now no longer exists. Change to xor.
      6 
      7 ; RUN: opt < %s -constprop -S | \
      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 
     20