http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51766
Bug #: 51766
Summary: [4.7 regression] sync_fetch_and_xxx atomicity
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
During the C++11 memory model conversion, expand_builtin_sync_operation was
updated. __sync_fetch_and_xxx and __sync_xxx_and_fetch now invoke
expand_atomic_fetch_op with MEMMODEL_SEQUENTIAL_CST.
return expand_atomic_fetch_op (target, mem, val, code, MEMMODEL_SEQ_CST,
after);
This has changed the memory model semantics of the builtins and causes the
rs6000/POWER architecture to emit a heavy-weight "sync" instruction instead of
a light-weight "lwsync" instruction, which is a regression.