This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/46888] missed optimization of zero_extract with constant inputs
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Oct 2012 08:07:49 +0000
- Subject: [Bug rtl-optimization/46888] missed optimization of zero_extract with constant inputs
- Auto-submitted: auto-generated
- References: <bug-46888-4@http.gcc.gnu.org/bugzilla/>
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.