Page MenuHomePhabricator

CodeGen: set correct result for atomic compound expressions
Needs ReviewPublic

Authored by t.p.northover on Wed, Sep 11, 4:29 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Atomic compound expressions try to use atomicrmw if possible, but this path doesn't set the Result variable, leaving it to crash in later code if anything ever tries to use the result of the expression. This fixes that issue by recalculating the new value based on the old one atomically loaded.

Diff Detail

Event Timeline

t.p.northover created this revision.Wed, Sep 11, 4:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Sep 11, 4:29 AM
Herald added subscribers: jfb, mcrosier. · View Herald Transcript