[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-12-19 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-12-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #23 from Hongtao.liu --- (In reply to Jakub Jelinek from comment #22) > (In reply to Hongtao.liu from comment #15) > > > Is the behavior well defined for n >= 64? I got > > > > > > foo.c:11:19: warning: left shift count >= width of

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-12-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #22 from Jakub Jelinek --- (In reply to Hongtao.liu from comment #15) > > Is the behavior well defined for n >= 64? I got > > > > foo.c:11:19: warning: left shift count >= width of type > > [-Wshift-count-overflow] > >11 |

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-23 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #21 from Hongtao.liu --- (In reply to H.J. Lu from comment #14) > Should we open a new bug for missed optimization? Missed optimization is fixed in GCC12.

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #20 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:7df89377a7ae3906255e38a79be8e5d962c3a0df commit r12-5486-g7df89377a7ae3906255e38a79be8e5d962c3a0df Author: liuhongt Date: Tue

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #19 from Hongtao.liu --- (In reply to Hongtao.liu from comment #18) > Created attachment 51806 [details] > untested patch. > > I'm testing this patch. This patch is for optimization.

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #18 from Hongtao.liu --- Created attachment 51806 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51806=edit untested patch. I'm testing this patch.

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #17 from H.J. Lu --- (In reply to David Binderman from comment #0) > For this C code: > > long pscc_a_2_3; > int pscc_a_1_4; > void pscc() > { > pscc_a_1_4 = __sync_fetch_and_and(_a_2_3, 1); > } > > compiled by recent gcc

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #16 from H.J. Lu --- (In reply to Hongtao.liu from comment #15) > (In reply to H.J. Lu from comment #13) > > (In reply to Hongtao.liu from comment #8) > > > unsigned long pscc_a_2_3; > > > int pscc_a_1_4; > > > unsigned long pc2; >

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #15 from Hongtao.liu --- (In reply to H.J. Lu from comment #13) > (In reply to Hongtao.liu from comment #8) > > unsigned long pscc_a_2_3; > > int pscc_a_1_4; > > unsigned long pc2; > > void pscc(int n) > > { > > long mask = 1ll <<

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #14 from H.J. Lu --- Should we open a new bug for missed optimization?

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #13 from H.J. Lu --- (In reply to Hongtao.liu from comment #8) > unsigned long pscc_a_2_3; > int pscc_a_1_4; > unsigned long pc2; > void pscc(int n) > { > long mask = 1ll << n; > pc2 = __sync_fetch_and_or(_a_2_3, mask) & mask; >

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #12 from Hongtao.liu --- (In reply to Hongtao.liu from comment #9) > (In reply to H.J. Lu from comment #6) > > Created attachment 51785 [details] > > The v2 incomplete patch > > > > Hongtao, please finish it. Thanks. > > I'm

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #11 from Andrew Pinski --- (In reply to Hongtao.liu from comment #9) > (In reply to H.J. Lu from comment #6) > > Created attachment 51785 [details] > > The v2 incomplete patch > > > > Hongtao, please finish it. Thanks. > > I'm

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #10 from Hongtao.liu --- (In reply to Hongtao.liu from comment #9) > (In reply to H.J. Lu from comment #6) > > Created attachment 51785 [details] > > The v2 incomplete patch > > > > Hongtao, please finish it. Thanks. > > I'm

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-15 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #9 from Hongtao.liu --- (In reply to H.J. Lu from comment #6) > Created attachment 51785 [details] > The v2 incomplete patch > > Hongtao, please finish it. Thanks. I'm trying to handle narrowing part in match.pd and add else

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-14 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 Hongtao.liu changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #8

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-14 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #7 from Hongtao.liu --- (In reply to H.J. Lu from comment #6) > Created attachment 51785 [details] > The v2 incomplete patch > > Hongtao, please finish it. Thanks. Yes.

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 H.J. Lu changed: What|Removed |Added Attachment #51784|0 |1 is obsolete|

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #5 from H.J. Lu --- Created attachment 51784 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51784=edit An incomplete patch Hongtao, can you finish it?

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-12 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #4 from H.J. Lu --- This avoids the crash: diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 0f79e9f05bd..14c5ecdf119 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -3443,7 +3443,7 @@

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 Martin Liška changed: What|Removed |Added Summary|[12 Regression] ice in |[12 Regression] ice in