On 10/18/13 03:56, Richard Biener wrote:
On Thu, 17 Oct 2013, Cong Hou wrote:

I tested this case with -fno-tree-loop-im and -fno-tree-pre, and it
seems that GCC could hoist j+1 outside of the i loop:

t3.c:5:5: note: hoisting out of the vectorized loop: _10 = (sizetype) j_25;
t3.c:5:5: note: hoisting out of the vectorized loop: _11 = _10 + 1;
t3.c:5:5: note: hoisting out of the vectorized loop: _12 = _11 * 4;
t3.c:5:5: note: hoisting out of the vectorized loop: _14 = b_13(D) + _12;
t3.c:5:5: note: hoisting out of the vectorized loop: _15 = *_14;
t3.c:5:5: note: hoisting out of the vectorized loop: _16 = _15 + 1;


But your suggestion is still nice as it can remove a branch and make
the code more brief. I have updated the patch and also included the
nested loop example into the test case.

Ok if it passes bootstrap & regtest.
Bootstrapped & regression tested on x86_64-unknown-linux-gnu. Installed on Cong's behalf.

Cong -- if you plan on contributing regularly to GCC, please start the process for write privileges. This form should have everything you need:

https://sourceware.org/cgi-bin/pdw/ps_form.cgi

Jeff

Reply via email to