InstCombine: Fold comparisons between unguessable allocas and other pointers
[oota-llvm.git] / test / Transforms / NaryReassociate / pr24301.ll
1 ; RUN: opt < %s -nary-reassociate -S | FileCheck %s
2
3 define i32 @foo(i32 %tmp4) {
4 ; CHECK-LABEL: @foo(
5 entry:
6   %tmp5 = add i32 %tmp4, 8
7   %tmp13 = add i32 %tmp4, -128  ; deleted
8   %tmp14 = add i32 %tmp13, 8    ; => %tmp5 + -128
9   %tmp21 = add i32 119, %tmp4
10   ; do not rewrite %tmp23 against %tmp13 because %tmp13 is already deleted
11   %tmp23 = add i32 %tmp21, -128
12 ; CHECK: %tmp23 = add i32 %tmp21, -128
13   ret i32 %tmp23
14 }