Fix testcase
[oota-llvm.git] / test / Transforms / Reassociate / 2002-05-15-SubReassociate.ll
1 ; With sub reassociation, constant folding can eliminate all of the constants.
2 ;
3 ; RUN: if as < %s | opt -reassociate -constprop -instcombine -dce | dis | grep add
4 ; RUN: then exit 1
5 ; RUN: else exit 0
6 ; RUN: fi
7
8 int "test"(int %A, int %B) {
9         %W = add int 5, %B
10         %X = add int -7, %A
11         %Y = sub int %X, %W
12         %Z = add int %Y, 12
13         ret int %Z
14 }