Re: [PATCH] Extend optimization for integer bit test on __atomic_fetch_[or|and]_*

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 8:09 PM H.J. Lu via Gcc-patches wrote: > > Extend optimization for > > _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); > _5 = (signed int) _1; > _4 = _5 >= 0; > > to > > _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); > _5 = (signed int) _1; > if (_5 >= 0) OK. > gcc/ >

[PATCH] Extend optimization for integer bit test on __atomic_fetch_[or|and]_*

2022-11-02 Thread H.J. Lu via Gcc-patches
Extend optimization for _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); _5 = (signed int) _1; _4 = _5 >= 0; to _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); _5 = (signed int) _1; if (_5 >= 0) gcc/ PR middle-end/102566 * tree-ssa-ccp.cc (optimize_atomic_bit_test_and): Also