https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194
H.J. Lu changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
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 |
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.
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
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.
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.
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
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;
>
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 <<
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?
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;
>
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
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
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
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
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
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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194
H.J. Lu changed:
What|Removed |Added
Attachment #51784|0 |1
is obsolete|
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?
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 @@
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
22 matches
Mail list logo