[Bug middle-end/53338] [4.8 Regression] Unaligned store generated for aligned data
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 14 08:51:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53338
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-14 08:39:03 UTC ---
After IVOPTs we lose the ability to stick the aligned markers at the memory
references. Before:
# PT = anything
# ALIGN = 16, MISALIGN = 0
vect_pa.21_35 = vect_pa.21_33 + 16;
MEM[(long int[10240] *)vect_pa.21_35] = vect_var_.20_31;
after:
MEM[symbol: a, index: ivtmp.29_19, step: 2, offset: 16B] = vect_var_.20_31;
but as ivtmp.29_19 is not of pointer type we do not have 'alignment'
information
for it - thus we do not exploit that it is { 0, +, 16 } in
get_object_alignment_1.
Previously we conservatively assumed "alignment" of TYPE_ALIGN but now we
have "known" alignment due to
if (TMR_INDEX (exp) && TMR_STEP (exp))
{
unsigned HOST_WIDE_INT step = TREE_INT_CST_LOW (TMR_STEP (exp));
align = MIN (align, (step & -step) * BITS_PER_UNIT);
known_alignment = true;
}
(but that results in alignment of 2 bytes based on step) and disregard type
information.
More information about the Gcc-bugs
mailing list