http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51895
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 --- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-19 13:03:14 UTC --- (In reply to comment #5) > Created attachment 26377 [details] > gcc47-pr51895.patch > > Untested patch that attempts to fix BLKmode MEM_REF expansion with > non-DECL_ADDRESSABLE non-BLKmode base. It creates abysmal code, so IMNSHO > eipa_sra should be fixed not to do this. Hm, can't we do better using extract_bit_field? I mean, it definitely should work to do any BIT_FIELD_REF on an rvalue, even if it is a register. The patch from comment #1 doesn't look completely wrong, it just seems that the caller should have catered for using the mode of the reg. The docs of operand_subword also say 'MODE is the mode of OP in case it is a CONST_INT' so MODE should be irrelevant if REG_P (op) ... Seems to be a tricky area, but using a stack temporary looks like overkill.