[PATCH] D67436: CodeGen: set correct result for atomic compound expressions
Tim Northover via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 04:29:08 PDT 2019
t.p.northover created this revision.
Herald added subscribers: jfb, mcrosier.
Herald added a project: clang.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67436
Files:
clang/lib/CodeGen/CGExprScalar.cpp
clang/test/CodeGen/atomic_ops.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67436.219688.patch
Type: text/x-patch
Size: 4232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190911/bbb5bcf2/attachment.bin>
More information about the cfe-commits
mailing list