Branch: refs/heads/master
Revision: b00e932
Author: daviditen
Log Message:
Merge pull request #16818 from daviditen/llvm-gasnet-comm-diff
Avoid a comm_get on a remote += operation for LLVM
[Paired with/reviewed by @mppf]
When ‘a’ is a wide reference,
a += 0.1
Was code being generated for LLVM as:
aLoc = get(a)
aLoc = +(get(a), 0.1)
put(a, aLoc)
Instead, reuse the local copy:
aLoc = get(a)
aLoc = +(aLoc, 0.1)
put(a, aLoc)
This fixes arrays/slices/commCounts/sliceLocDist.chpl for
CHPL_COMM=gasnet with --llvm.
Modified Files:
M compiler/codegen/expr.cpp
Compare: https://github.com/chapel-lang/chapel/compare/f8694cb09812...b00e9325ffce