[Bug tree-optimization/69042] [6 regression] Missed optimization in ivopts
amker at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 7 12:27:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69042
amker at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amker at gcc dot gnu.org
--- Comment #2 from amker at gcc dot gnu.org ---
For iv use:
use 0
address
in statement _9 = indexes[i_23];
at position indexes[i_23]
type const int *
base (const int *) (&indexes + 4)
step 4
base object (void *) &indexes
related candidates
Before the change, two candidates are added:
candidate 8
var_before ivtmp.12
var_after ivtmp.12
incremented before exit test
type unsigned int
base (unsigned int) (&indexes + 4)
step 4
base object (void *) &indexes
candidate 10
var_before ivtmp.14
var_after ivtmp.14
incremented before exit test
type unsigned int
base (unsigned int) &indexes
step 4
base object (void *) &indexes
After the change only candidate 8 is added. I did this to minimize the number
of candidates. Maybe that's too aggressive. Probably candidate like this
(with offset stripped) should be added, I will check if it causes new
regressions.
Another problem is candidate 8 could be chosen to decrease register pressure,
but isn't. I will check why the register pressure cost doesn't work in this
case. Though candidate 8 is still a little bit worse than candidate 10,
because of one more setup instruction in loop pre-header block.
More information about the Gcc-bugs
mailing list