This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40697] inefficient code to extract least bits from an integer value
- From: "bernds at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2010 10:56:09 -0000
- Subject: [Bug target/40697] inefficient code to extract least bits from an integer value
- References: <bug-40697-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from bernds at codesourcery dot com 2010-03-16 10:56 -------
Created an attachment (id=20117)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20117&action=view)
A patch to fix it.
The andsi3 expander has code to do the right thing, but
avoid_expensive_constant prevents it from seeing the constant. This can be
fixed by tweaking the rtx_costs to detect the same cases as the expander.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40697