[Attributor][Fix] Add alignment return attribute to HeapToStack
This patch changes the HeapToStack optimization to attach the return alignment attribute information to the created alloca instruction. This would cause problems when replacing the heap allocation with an alloca did not respect the alignment of the original heap allocation, which would typically be aligned on an 8 or 16 byte boundary. Malloc calls now contain alignment attributes, so we can use that information here. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D115888
Loading
Please register or sign in to comment