This is an archive of the discontinued LLVM Phabricator instance.

[SROA] Fix alignment for uses of PHI nodes.
ClosedPublic

Authored by efriedma on Aug 27 2018, 6:21 PM.

Details

Summary

Splitting an alloca can decrease the alignment of GEPs into the partition. Normally, rewriting accounts for this, but the code was missing for uses of PHI nodes and select instructions.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38707 .

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Aug 27 2018, 6:21 PM

This patch fixes a problem with Rust emitting code with causing unaligned access: https://github.com/rust-lang/rust/issues/53181

davide accepted this revision.Aug 28 2018, 7:21 AM

LGTM.

This revision is now accepted and ready to land.Aug 28 2018, 7:21 AM
This revision was automatically updated to reflect the committed changes.