Constant merger patch to fix bug 17815 [Constant merging may illegally downgrade global alignment]

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Nov 12 12:10:14 PST 2013


> Agreed that it is invalid when dealing with implicit alignment without TD. I
> think you should also amend getAlignment as in my patch though -- as it
> stands, with TD it will always set to at least the preferred alignment,
> whereas if we're merging an "align 2" with an "align 4" we might as well use
> 4 rather than the preferred granularity.

Yes, you are right. In fact, I now noticed that we were already
avoiding the merging explicit and implicit alignments without TD. We
were just producing the wrong result when we had TD.

The attached patch is your patch reformatted and with tests added. Do
you think the tests cover the issues in pr17815? If so, the patch
LGTM. Do you have commit access?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 2374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131112/929cbde2/attachment.bin>


More information about the llvm-commits mailing list