blob: fcbd723c099322b41699aaef8029bbbee94ac2a4 [file] [log] [blame]
Chris Lattner2241b7b2002-05-15 21:59:31 +00001; 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
8int "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}