Lowering: Atomic ops can produce a value (dotnet/coreclr#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)
commite21c17a39a36b0f2a6b003cad8e6d2f24df7707d
tree5388b66508b3834644da7296d094d64b7c806277
parent5967ef41af407e9726a8452806c186d10ab4b351
Lowering: Atomic ops can produce a value (dotnet/coreclr#19173)

* Lowering: Atomic ops can produce a value

dotnet/coreclr#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 dotnet/coreclr#19171

Commit migrated from https://github.com/dotnet/coreclr/commit/8b126cf6d62790a70ea15b6c4a35d8de3ddfd795
src/coreclr/src/jit/lower.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_19171/GitHub_19171.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_19171/GitHub_19171.csproj [new file with mode: 0644]