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, 10 Dec 2010 19:42:14 +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
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.10 19:42:11
Version|unknown |4.6.0
Ever Confirmed|0 |1
Severity|normal |enhancement
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-12-10 19:42:11 UTC ---
Here is a simpler example. Take:
struct b
{
int t;
int tt;
};
union a
{
long long t;
struct b b;
};
long long f(int i, int t)
{
long long ii = ((long long)i) << 32;
union a a;
a.t = 0;
a.b.t = i;
a.b.tt = t;
return a.t;
}
--- CUT ---
For MIPS64r2 (both n64 and n32):
move $2,$0
dins $2,$4,32,32
j $31
dins $2,$5,0,32
--- CUT ---
is produced but the first two instructions can really be done as one shift:
dsll $2,$4,32
j $31
dins $2,$5,0,32