1; RUN: opt < %s -nary-reassociate -S | FileCheck %s 2; RUN: opt < %s -passes='nary-reassociate' -S | FileCheck %s 3 4define i32 @foo(i32 %tmp4) { 5; CHECK-LABEL: @foo( 6entry: 7 %tmp5 = add i32 %tmp4, 8 8 %tmp13 = add i32 %tmp4, -128 ; deleted 9 %tmp14 = add i32 %tmp13, 8 ; => %tmp5 + -128 10 %tmp21 = add i32 119, %tmp4 11 ; do not rewrite %tmp23 against %tmp13 because %tmp13 is already deleted 12 %tmp23 = add i32 %tmp21, -128 13; CHECK: %tmp23 = add i32 %tmp21, -128 14 ret i32 %tmp23 15} 16