aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. Can you double-check that the memory layout is actually what we think it is by inspecting the generated IR? Otherwise this LGTM. https://reviews.llvm.org/D22227