This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21485] [4.2/4.3/4.4 Regression] missed load PRE
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2008 23:54:40 -0000
- Subject: [Bug tree-optimization/21485] [4.2/4.3/4.4 Regression] missed load PRE
- References: <bug-21485-10607@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #30 from rguenth at gcc dot gnu dot org 2008-10-03 23:54 -------
Comment #6 still applies. On the trunk we do not fully exploit the partial
redundant load of array[k] in
if (k < j)
if (array[k] < array[k + 1L])
++k;
if (array[i] < array[k])
but we transform the above to
if (k < j)
{
tmp1 = array[k];
tmp2 = array[k+1];
if (tmp1 < tmp2)
++k;
else
tmp1 = array[k+1];
}
if (array[i] < tmp1)
missing the full redundancy of array[k+1].
Reduced testcase:
long
NumSift (long *array, unsigned long k)
{
if (array[k] < array[k + 1L])
++k;
return array[k];
}
with integer k it gets somewhat more complicated even.
The question is whether this explains the slowdown compared to GCC 3.4.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2006-07-05 09:23:46 |2008-10-03 23:54:40
date| |
Summary|[4.2/4.3/4.4 Regression] |[4.2/4.3/4.4 Regression]
|codegen regression due to |missed load PRE
|PRE increasing register |
|pressure (missing load PRE |
|really) |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21485