This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51766] New: [4.7 regression] sync_fetch_and_xxx atomicity
- From: "dje at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jan 2012 15:00:35 +0000
- Subject: [Bug middle-end/51766] New: [4.7 regression] sync_fetch_and_xxx atomicity
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: dje@gcc.gnu.org
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.