This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/46888] missed optimization of zero_extract with constant inputs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46888

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-12 08:07:49 UTC ---
Created attachment 28428
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28428
A third patch

Here is a third patch which improves the code a different way, one which seems
better as combine.c already had the code which is supposed to do the combining
of:
(set (x) (const))
(set (zero_extract (x a b) (const))
But it forgot that x can be a non subreg if we are using a zero extract.

Also it is easy add the case where the second set does not have a const there
and optimize it to a shift followed by an and which gets my testcase too.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]