Hi,
I ran into the following test case which breaks if I compile for x86_64-linux
at -O2 or higher, but works at -O1.
The bug appears to be in the SROA pass where a 12-byte memcpy is replaced with
a 16-byte <4 x float> store, which writes past the boundary of a struct on the
stack. I includes a fix here for review which keeps the memcpy when the memory
transfer size appears to be too large, but I am not very familiar with SROA and
I am not sure if there are other similar cases I should cover.
Any advice will be appreciated,
- Gao