[all-commits] [llvm/llvm-project] 10e0d6: CodeGen: set correct result for atomic compound ex...

Tim Northover via All-commits all-commits at lists.llvm.org
Thu Nov 7 06:00:27 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 10e0d64337d64ebdb658bf9108bd9bb48fb5390c
      https://github.com/llvm/llvm-project/commit/10e0d64337d64ebdb658bf9108bd9bb48fb5390c
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/test/CodeGen/atomic_ops.c

  Log Message:
  -----------
  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.




More information about the All-commits mailing list