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: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2009 09:59:30 -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 #2 from steven at gcc dot gnu dot org 2009-07-09 09:59 -------
Maybe we can fix this in expand instead: if we see (x & CONST) and CONST is a
masking constant that isn't a legitimate constant for the the target, then see
if the sum of the rtx_cost of expressing the mask as shifts is less than the
rtx_cost of a load and an AND.
I think (but I'm not sure...) that if you do this with a peephole, you're too
late to avoid the constant pool.
Is this also a size issue?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-09 09:59:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40697