https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #18 from Marc Glisse ---
(In reply to Gergö Barany from comment #17)
> the division used to be replaced by a shift that updated the condition code
> register (again, on ARM; r250337):
(just my opinion)
At a high level (gimple), (unsi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #17 from Gergö Barany ---
Thanks for fixing this. I did notice a small thing that might be considered a
tiny regression due to the fix.
If the divisor is a small power of 2, as in the following example:
int fn1(char p1) {
long a;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
Jakub Jelinek changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #15 from Jakub Jelinek ---
Author: jakub
Date: Wed Jul 19 13:10:05 2017
New Revision: 250342
URL: https://gcc.gnu.org/viewcvs?rev=250342&root=gcc&view=rev
Log:
PR tree-optimization/81346
* match.pd: Optimize (X - 1U)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #14 from Jakub Jelinek ---
Author: jakub
Date: Wed Jul 19 12:31:59 2017
New Revision: 250338
URL: https://gcc.gnu.org/viewcvs?rev=250338&root=gcc&view=rev
Log:
PR tree-optimization/81346
* fold-const.h (fold_div_compa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #13 from Marc Glisse ---
(In reply to Jakub Jelinek from comment #12)
> Created attachment 41781 [details]
> gcc8-pr81346-2.patch
>
> Further optimization from build_range_check.
I wonder if "1" is that special, this optimization ba
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #12 from Jakub Jelinek ---
Created attachment 41781
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41781&action=edit
gcc8-pr81346-2.patch
Further optimization from build_range_check.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
Jakub Jelinek changed:
What|Removed |Added
Attachment #41760|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #10 from Marc Glisse ---
(In reply to Jakub Jelinek from comment #9)
> (In reply to Marc Glisse from comment #8)
> > I think always using an unsigned type for the range check would be simpler.
> > If we try to check that x>=INT_MIN+2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #9 from Jakub Jelinek ---
(In reply to Marc Glisse from comment #8)
> I think always using an unsigned type for the range check would be simpler.
> If we try to check that x>=INT_MIN+2 && x<=INT_MAX-2 with -fwrapv, int is
> still not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #8 from Marc Glisse ---
I think always using an unsigned type for the range check would be simpler. If
we try to check that x>=INT_MIN+2 && x<=INT_MAX-2 with -fwrapv, int is still
not a suitable type in which to do x-(INT_MIN+2)<=INT_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
Jakub Jelinek changed:
What|Removed |Added
Attachment #41707|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #6 from Marc Glisse ---
(In reply to Jakub Jelinek from comment #5)
> Untested WIP patch. Still no idea how to handle the build_range_check stuff
> at GIMPLE, that function is pretty huge. Shall I just always generate the
> cast to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #5 from Jakub Jelinek ---
Created attachment 41707
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41707&action=edit
gcc8-pr81346-wip.patch
Untested WIP patch. Still no idea how to handle the build_range_check stuff at
GIMPLE,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
Jakub Jelinek changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #2 from Andrew Pinski ---
Most likely the optimization is in fold-const.c and has not been moved to
match.pd yet.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #1 from Gergö Barany ---
Sorry, forgot to add the command line. I use gcc -O3 on all platforms
18 matches
Mail list logo