> It seems to me that the issue in the end is that where we compute > alignment from is the pieces gathered by get_inner_reference > instead of computing it alongside of that information in > get_inner_reference, taking advantage of DECL_OFFSET_ALIGN > and the array element type alignment there. This would be > another opportunity to merge get_inner_reference and > get_object_alignment_2 (or have a common worker).
Yes, the problem is the way we extract the alignment information in the RTL expander by means of get_inner_reference. > Do I understand you correctly that without using -fno-tree-ccp there > are currently no regressions? What about -O0 then? The code > generated by -O0 on x86_64 currently is quite horrible of course, > so maybe we don't care too much... I think -Og disables CCPs > bit-tracking though. There are no regressions at -O, at least in simple cases. Of course -O0 is also pessimized because CCP bit-tracking isn't enabled at -O0. -- Eric Botcazou