HomePhabricator

CodeGen: set correct result for atomic compound expressions
7710e2162bd4Unpublished

Authored by t.p.northover on Nov 7 2019, 5:36 AM.

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

CodeGen: set correct result for atomic compound expressions

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.

(cherry picked from commit 10e0d64337d64ebdb658bf9108bd9bb48fb5390c)

Details

Event Timeline