HomePhabricator

Fix a *nasty* miscompile in experimental unordered atomic lowering

Authored by reames on Oct 4 2019, 5:32 PM.

Description

Fix a *nasty* miscompile in experimental unordered atomic lowering

This is an omission in rL371441. Loads which happened to be unordered weren't being added to the PendingLoad set, and thus weren't be ordered w/respect to side effects which followed before the end of the block.

Included test case is how I spotted this. We had an atomic load being folded into a using instruction after a fence that load was supposed to be ordered with. I'm sure it showed up a bunch of other ways as well.

Spotted via manual inspecting of assembly differences in a corpus w/and w/o the new experimental mode. Finding this with testing would have been "unpleasant".

llvm-svn: 373814

Details

Committed
reamesOct 4 2019, 5:32 PM
Parents
rG9fe5d730c707: [Test] Add a test case fo a missed oppurtunity in implicit null checking
Branches
Unknown
Tags
Unknown