3 ms·
The question is whether the user replacing `f(value)` with `if value == expected then f(expected) else f(value)` preserves program semantics. Look for Address
by gadmm 3y ago
The question is whether the user replacing `f(value)` with `if value == expected then f(expected) else f(value)` preserves program semantics.
Look for Address dependency in Arm: see e.g. https://developer.arm.com/documentation/ddi0406/c/Appendices/Barrier-Litmus-Tests/Simple-ordering-and-barrier-cases/Address-dependency-with-object-construction https://developer.arm.com/documentation/ddi0406/c/Appendices... .
Note that the approach in the original post is also wrong if the GC sees the expected value, because it would try to access it regardless of whether the prediction is valid.