Lowering: Atomic ops can produce a value (#19173)
authorCarol Eidt <carol.eidt@microsoft.com>
Fri, 27 Jul 2018 23:19:48 +0000 (16:19 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Jul 2018 23:19:48 +0000 (16:19 -0700)
commit8b126cf6d62790a70ea15b6c4a35d8de3ddfd795
tree311a2f8173b9af8eb8a3a22398146ec591223903
parente59139eaaa78ae79a47c2373488c872818b05efe
Lowering: Atomic ops can produce a value (#19173)

* Lowering: Atomic ops can produce a value

#18887 changed OperIsStore to include the atomic functions, but `Lowering::LowerArg()` and `Lowering::CheckCallArg()` assume that stores do not produce a value, so it doesn't correctly set the argument register (or build a `PUTARG_REG`) for the case where the result of an atomic op is passed to a call.
Fix this and add additional asserts.

Fix #19171
src/jit/lower.cpp
tests/src/JIT/Regression/JitBlue/GitHub_19171/GitHub_19171.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_19171/GitHub_19171.csproj [new file with mode: 0644]