New testcase
[oota-llvm.git] / test / Transforms / Reassociate / 2002-05-15-AgressiveSubMove.ll
1 ; RUN: if as < %s | opt -reassociate -instcombine | dis | grep add
2 ; RUN: then exit 1
3 ; RUN: else exit 0
4 ; RUN: fi
5
6 int "test"(int %A) {
7         %X = add int %A, 1
8         %Y = add int %A, 1
9         %r = sub int %X, %Y
10         ret int %r               ; Should be equal to 0!
11 }