1 ; RUN: opt < %s -nary-reassociate -S | FileCheck %s
2 ; RUN: opt < %s -passes='nary-reassociate' -S | FileCheck %s
4 define i32 @foo(i32 %tmp4) {
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