Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 
      3 ; CHECK-NOT: add
      4 
      5 define i32 @test(i32 %A) {
      6         %A.neg = sub i32 0, %A          ; <i32> [#uses=1]
      7         %.neg = sub i32 0, 1            ; <i32> [#uses=1]
      8         %X = add i32 %.neg, 1           ; <i32> [#uses=1]
      9         %Y.neg.ra = add i32 %A, %X              ; <i32> [#uses=1]
     10         %r = add i32 %A.neg, %Y.neg.ra          ; <i32> [#uses=1]
     11         ret i32 %r
     12 }
     13 
     14