This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52055] load of 64-bit pointer reads 64 bits even when only 32 are used
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jan 2012 18:29:33 +0000
- Subject: [Bug target/52055] load of 64-bit pointer reads 64 bits even when only 32 are used
- Auto-submitted: auto-generated
- References: <bug-52055-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52055
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-31 18:29:33 UTC ---
Combine can already do this kind of change, as can be seen e.g. on
void foo (unsigned long long *p) { asm volatile ("" : : "rm" ((unsigned) *p));
}
where combine shortens the load into SImode load, but on this testcase we don't
attempt to combine it, because cant_combine_insn_p on the insn with subreg says
we shouldn't combine it (the src is a subreg:SI of the reg:DI initialized by
the DImode memory load, but dest is hard register %eax, which has likely
spilled
register class).
So, shell we do this kind of shortening in fwprop instead? If a MEM load has
all uses subregged to a narrower mode, try to subreg it and adjust the callers?