[Bug middle-end/102566] [i386] GCC should emit LOCK BTS for simple bit-test-and-set operations with std::atomic

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 5 16:02:14 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102566

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #14)
> Created attachment 51556 [details]
> The v5 patch
> 
> Changes in v5:
> 
> 1. Check SSA_NAME before SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

Why don't you just move this to match.pd instead as suggested by Richard B. on
the mailing list?  Then you get the check for SSA_NAME_OCCURS_IN_ABNORMAL_PHI
for free and such.  Plus other passes will do the optimization too ....


More information about the Gcc-bugs mailing list