blob: 192b8d3d086c3a6b508a8be9dbb8db040723d610 [file] [log] [blame]
Chris Lattner557a1432002-05-08 21:34:22 +00001; With reassociation, constant folding can eliminate the +/- 30 constants.
2;
3; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 30
4; RUN: then exit 1
5; RUN: else exit 0
6; RUN: fi
7
8int "test"(int %reg109, int %reg1111) {
9 %reg115 = add int %reg109, -30 ; <int> [#uses=1]
10 %reg116 = add int %reg115, %reg1111 ; <int> [#uses=1]
11 %reg117 = add int %reg116, 30 ; <int> [#uses=1]
12 ret int %reg117
13}