This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32044] udivdi3 counterproductive, unwarranted use
- 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: 23 May 2007 14:13:18 -0000
- Subject: [Bug middle-end/32044] udivdi3 counterproductive, unwarranted use
- References: <bug-32044-11706@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from rguenth at gcc dot gnu dot org 2007-05-23 15:13 -------
So this is now an enhancement request for sccp to honor loop roll count or
basic-block frequency and cost of the replacement. Note the loop appears to be
peeled twice before sccp already, but peeling doesn't decay probabilities
further.
Testcase:
int rmg(unsigned long long nsec)
{
int sec = 0;
nsec++;
while (__builtin_expect(nsec >= 1000000000UL, 0)) {
nsec -= 1000000000UL;
++sec;
}
return sec;
}
note this can be worked around with -fno-tree-scev-cprop as well.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-05-23 15:13:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32044