This is an archive of the discontinued LLVM Phabricator instance.

Don't promote load alignment from packed structure elements
ClosedPublic

Authored by pete on Feb 11 2016, 11:23 AM.

Details

Summary

Hi all

Looks like http://reviews.llvm.org/D8339 breaks loads from packed structs.

The problem is that when we create a new load of the aggregate type, we didn't set its alignment. So a load of a packed int gets promote from align 1 to align 4.

I was told about this offline by Neil Henning from Codeplay. He was able to describe the problem well enough that I could make this small test case.

He also mentioned that this is breaking his code in a way where he would really like to see this get in to 3.8. No idea if thats possible, but just putting that out there to see if that would be ok.

Thanks,
Pete

Diff Detail

Repository
rL LLVM

Event Timeline

pete updated this revision to Diff 47690.Feb 11 2016, 11:23 AM
pete retitled this revision from to Don't promote load alignment from packed structure elements.
pete updated this object.
pete added reviewers: majnemer, deadalnix.
pete set the repository for this revision to rL LLVM.
pete added subscribers: hans, llvm-commits.
majnemer accepted this revision.Feb 11 2016, 11:44 AM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 11 2016, 11:44 AM
This revision was automatically updated to reflect the committed changes.
pete added a subscriber: pete.Feb 11 2016, 1:16 PM

Thanks for the very quick review David.

How do you feel about taking this in 3.8?

Cheers,
Pete