https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
Martin Liška changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #29 from Martin Liška ---
Author: marxin
Date: Mon Sep 16 14:22:16 2019
New Revision: 275749
URL: https://gcc.gnu.org/viewcvs?rev=275749&root=gcc&view=rev
Log:
Fix PR88784, middle end is missing some optimizations about unsigned
201
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #28 from rguenther at suse dot de ---
On Tue, 18 Jun 2019, helijia at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #27 from Li Jia He ---
> Created attachment 46495
> --> https://gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #27 from Li Jia He ---
Created attachment 46495
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46495&action=edit
[v2] try to fix this issue in ifcombine(and_comparisons_1 and or_comparisons_1)
This patch is similar to the previ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #26 from rguenther at suse dot de ---
On Tue, 11 Jun 2019, helijia at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #25 from Li Jia He ---
> Indeed, this patch cannot catch all variants
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #25 from Li Jia He ---
Indeed, this patch cannot catch all variants that appear.
I found that the optimize_vec_cond_expr function in the tree-ssa-reassoc.c file
will
call maybe_fold_and_comparisons and maybe_fold_or_comparisons, so j
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #24 from rguenther at suse dot de ---
On Tue, 11 Jun 2019, helijia at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #23 from Li Jia He ---
> Created attachment 46477
> --> https://gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #23 from Li Jia He ---
Created attachment 46477
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46477&action=edit
try to fix this issue in ifcombine(and_comparisons_1 and or_comparisons_1)
I am trying to solve this issue directl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #22 from Qi Feng ---
Two more similar ones:
x <= y && x == ( 0 or XXX_MIN ) --> x == ( 0 or XXX_MIN )
x >= y && x == ( UXXX_MAX or XXX_MAX ) --> x == ( UXXX_MAX or XXX_MAX )
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #21 from rguenther at suse dot de ---
On Fri, 31 May 2019, ffengqi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #20 from Qi Feng ---
> I have tried to merge signed and unsigned toge
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #20 from Qi Feng ---
I have tried to merge signed and unsigned together:
/* x > y && x != ( 0 or XXX_MIN ) --> x > y */
(for and (truth_and bit_and)
(simplify
(and:c (gt:c@3 @0 @1) (ne @0 INTEGER_CST@2))
(if (INTEGRAL_T
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #19 from rguenther at suse dot de ---
On Mon, 27 May 2019, ffengqi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #18 from Qi Feng ---
> I only learned gcc for about 2 months, and I h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #18 from Qi Feng ---
I only learned gcc for about 2 months, and I have to say that I don't fully
understand what you guys were saying. Is match.pd the right place to fix this
issue? Am I in the wrong direction?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #17 from rguenther at suse dot de ---
On Fri, 24 May 2019, glisse at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #16 from Marc Glisse ---
> (In reply to rguent...@suse.de from comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #16 from Marc Glisse ---
(In reply to rguent...@suse.de from comment #15)
> It can matter because we might have gimplified the && to
> control flow.
Indeed. You want to look at the forwprop1 dump to see what gimple-match would
need t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #15 from rguenther at suse dot de ---
On Fri, 24 May 2019, ffengqi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #14 from Qi Feng ---
> Checking .original and .optimized file is just
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #14 from Qi Feng ---
Checking .original and .optimized file is just a quick method I use to check
whether an optimization happened (if not happen in first and last pass,
probably it didn't happen). I didn't mean or think the transfor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #13 from rguenther at suse dot de ---
On Fri, 24 May 2019, glisse at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #12 from Marc Glisse ---
> (In reply to Qi Feng from comment #11)
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #12 from Marc Glisse ---
(In reply to Qi Feng from comment #11)
> I tried 2 patterns for the following test
>
> /* 1. x > y && x != 0 --> x > y */
> /* 2. y < x && x != 0 --> y < x */
> /* 3. x != 0 &&
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #11 from Qi Feng ---
I tried 2 patterns for the following test
/* 1. x > y && x != 0 --> x > y */
/* 2. y < x && x != 0 --> y < x */
/* 3. x != 0 && x > y --> x > y */
/* 4. x != 0 && y <
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #10 from Richard Biener ---
(In reply to Qi Feng from comment #9)
> And there's another problem. Take `x > y && x != 0 --> x > y' for
> example, I would also like to do
>
>x < y && y != 0 --> x < y
>x != 0 && x
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #9 from Qi Feng ---
And there's another problem. Take `x > y && x != 0 --> x > y' for
example, I would also like to do
x < y && y != 0 --> x < y
x != 0 && x > y --> x > y
y != 0 && x < y --> x < y
If t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #8 from rguenther at suse dot de ---
On Wed, 22 May 2019, ffengqi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
>
> --- Comment #7 from Qi Feng ---
> I add some patterns in match.pd which handles th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #7 from Qi Feng ---
I add some patterns in match.pd which handles the original 5 transformations.
But I don't the language used in match.pd well, the patterns I wrote are very
similar.
And I haven't found predicates for constant valu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #6 from Fredrik Hederstierna
---
Created attachment 46397
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46397&action=edit
Some more patterns
Looking into this I found some more places where it seems to be non-optimal
code, ma
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #5 from Qi Feng ---
(In reply to Qi Feng from comment #4)
> The fourth to the last should be:
>
> x < y || x != INT_MAX --> x != UINT_MAX
>
> sorry for the typo.
x < y || x != INT_MAX --> x != INT_MAX
ty
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #4 from Qi Feng ---
The fourth to the last should be:
x < y || x != INT_MAX --> x != UINT_MAX
sorry for the typo.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #3 from Qi Feng ---
I have extended the transformations as following, the first five are the
original ones:
* unsigned
Use UINT_MAX for demonstration, similar for UCHAR_MAX, USHRT_MAX, UINT_MAX,
ULONG_MAX, ULLONG_MAX
x > y
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
Qi Feng changed:
What|Removed |Added
CC||ffengqi at gcc dot gnu.org
--- Comment #2 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|
30 matches
Mail list logo