"(void) __sync_fetch_and_add(d, 1)" and variations on that theme (i.e. the sync sub builtins and -1/1) should be generating "lock inc" and "lock dec" instead of "lock add" and "lock sub"
-- Summary: Missed optimization with x86 sync builtins Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nmiell at comcast dot net GCC target triplet: i?86-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28909