Chris Lattner | 557a143 | 2002-05-08 21:34:22 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
8 | int "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 | } |