> You are basically (but non-optimally) locally re-implementing > what expr.c:get_object_or_type_alignment does, for the > bare MEM_REF case (you don't consider offsets that > do not change the alignment, nor alignment information > present on the SSA name).
Gosh. And now I distinctly remember suggesting that the function be moved to the same file as the others... > Note that in expr.c gete_object_or_type_alignment is only > called on [TARGET_]MEM_REFs (I didn't export that function > exactly because of its restrictions, if we want to export it > we should assert it is only called for [TARGET_]MEM_REFs). OK, let's export it, move it to builtins.c and and add the assert. > Thus, apart from the exp_align computation the patch looks ok > (it's only non-optimal, not incorrect). I'll post an adjusted version. Thanks for the review. -- Eric Botcazou