Fix a bunch of issues found in a testcase from 400.perlbench.
[oota-llvm.git] / test / Transforms / Reassociate / 2002-05-15-AgressiveSubMove.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add
2
3 int %test(int %A) {
4         %X = add int %A, 1
5         %Y = add int %A, 1
6         %r = sub int %X, %Y
7         ret int %r               ; Should be equal to 0!
8 }