This is an archive of the discontinued LLVM Phabricator instance.

Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg`.
AbandonedPublic

Authored by DiamondLovesYou on Aug 5 2015, 2:46 PM.

Details

Reviewers
jfb
Summary

Divide the primitive size in bits by eight so the initial load's alignment is in bytes as expected. Tested with the included unit test.

Diff Detail

Repository
rL LLVM

Event Timeline

DiamondLovesYou retitled this revision from to Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg`..
DiamondLovesYou updated this object.
DiamondLovesYou added a reviewer: jfb.
DiamondLovesYou set the repository for this revision to rL LLVM.
DiamondLovesYou added a subscriber: llvm-commits.
jfb accepted this revision.Aug 5 2015, 3:08 PM
jfb edited edge metadata.
jfb added subscribers: morisset, reames.

lgtm

Adding @morisset and @reames as FYI.

lib/CodeGen/AtomicExpandPass.cpp
553

In a separate patch please also make this atomic! The comment above says that's what the generated code does... but it's not :-)

This revision is now accepted and ready to land.Aug 5 2015, 3:08 PM
jfb edited edge metadata.Aug 5 2015, 3:09 PM
DiamondLovesYou abandoned this revision.Aug 6 2015, 8:53 AM