GlobalOpt can slice structs/arrays and change GEPs in the process, but it was not updating alignments for load/store users. This eventually causes the crashing seen in:
https://llvm.org/PR49661
https://llvm.org/PR50253
On x86, this required SLP+codegen to create an aligned vector store on an invalid address. The bugs would be easier to demonstrate on a target with stricter alignment requirements.
This is my first time looking at this pass, so I'm not sure if this is a complete solution. The alignment updating code is adapted from InstCombine, so I assume that part is tested and good.
Alignment of the new global is updated here.