This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/44470] [4.6 Regression] Failed to bootstrap with - -with-arch=atom
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2010 14:57:17 -0000
- Subject: [Bug bootstrap/44470] [4.6 Regression] Failed to bootstrap with - -with-arch=atom
- References: <bug-44470-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from ubizjak at gmail dot com 2010-06-10 14:57 -------
(In reply to comment #11)
> > > I am not sure this is correct. The code prior to revision 160394 was
> > > written in such a way to support X86_TUNE_OPT_AGU. We may have missed
> > > some cases. But it is mostly correct. I'd like to know what specific
> > > cases revision 160394 tried to fix. Thanks.
> >
> > The patch fixes general problem, where we simply output lea from add{si,di}
> > instruction. This is not correct, since lea does not clobber flags, so we
> > should split add RTX to lea RTX to model this fact.
> >
>
> ADD is always faster than LEA for adding a register. However
> there is a special case on Atom where ADD should be avoided.
> It is true that LEA doesn't touch flags and we used it instead
> of ADD which touches flags. It is an optimization specific for
> Atom. You can think it as a special ADD for Atom and pretend
> it clobbers flags. We shouldn't model it as a real LEA since
> it is used to implement a faster ADD in this special case.
>
> Uros, I'd like to revert revision 160394 to fix bootstrap on
> Atom. I will work with you to resolve issues you discovered
> without affecting Atom performance. Thanks.
OK, please go ahead. The correct fix is not as simple as I have thought.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44470