Bug 87549 - Optimize fetch atomics with unused results
Summary: Optimize fetch atomics with unused results
Status: RESOLVED DUPLICATE of bug 87548
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 8.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-08 08:34 UTC by David Feuer
Modified: 2018-10-08 09:03 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Feuer 2018-10-08 08:34:35 UTC
Atomic fetch and and/or/xor/etc., are not natively supported on amd64/x86_64, so they're simulated with CAS loops. There's a special case when this is unnecessary: when the fetched result is never used. In this case, it might be better to use a non-fetching operation instead.
Comment 1 Andreas Schwab 2018-10-08 09:03:45 UTC
.

*** This bug has been marked as a duplicate of bug 87548 ***