public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values
       [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
@ 2020-09-02  4:46 ` fxue at os dot amperecomputing.com
  2020-09-02  6:20 ` glisse at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: fxue at os dot amperecomputing.com @ 2020-09-02  4:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712

Feng Xue <fxue at os dot amperecomputing.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxue at os dot amperecomputing.com

--- Comment #24 from Feng Xue <fxue at os dot amperecomputing.com> ---
If(In reply to Jakub Jelinek from comment #15)
> For
> A*B+A*C -> (B+C)*A
> the problematic cases are
> A==-1 and B > 0 and C==(max-B)+1 (i.e. when B+C overflows to min)
> or A==0 and B < 0 and C<min-B
> or A==0 and B > 0 and C>max-B
> (last two cases cover when B+C overflows)
> For
> A*B-A*C -> (B-C)*A
> the problematic cases are
> A==-1 and B > 0 and C==min+B (i.e. when B-C is min)
> or A==0 and B < -1 and C>B-min
> or A==0 and B >= 0 and C<B-max
> (last two cases cover when B-C overflows)
> Again, we perform the operation right now if A is not 0 and not -1 for
> certain.
> I guess we could handle those cases by using something like
> check_for_binary_op_overflow, except that for the case where A might be -1
> and plusminus equal to MINUS_EXPR we also need to make sure the result of
> B-C is known not to be min.

Another point: if B+-C can be folded to an existing gimple value, we might
deduce B+-C does not overflow?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values
       [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
  2020-09-02  4:46 ` [Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values fxue at os dot amperecomputing.com
@ 2020-09-02  6:20 ` glisse at gcc dot gnu.org
  2021-05-14  9:52 ` [Bug tree-optimization/92712] [9 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2020-09-02  6:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712

--- Comment #25 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Feng Xue from comment #24)
> Another point: if B+-C can be folded to an existing gimple value, we might
> deduce B+-C does not overflow?

We can deduce that loading this value that represents B+-C does not overflow at
runtime (since we aren't computing anything, just copying some other value),
but not that the operation B+-C would not overflow if it was actually
evaluated. So it could help a bit sometimes. We still need to ensure that the
multiplication by A does not overflow though.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/92712] [9 Regression] Performance regression with assumed values
       [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
  2020-09-02  4:46 ` [Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values fxue at os dot amperecomputing.com
  2020-09-02  6:20 ` glisse at gcc dot gnu.org
@ 2021-05-14  9:52 ` jakub at gcc dot gnu.org
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
  2022-05-27  8:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/92712] [9 Regression] Performance regression with assumed values
       [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-14  9:52 ` [Bug tree-optimization/92712] [9 " jakub at gcc dot gnu.org
@ 2021-06-01  8:15 ` rguenth at gcc dot gnu.org
  2022-05-27  8:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/92712] [9 Regression] Performance regression with assumed values
       [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
@ 2022-05-27  8:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  8:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #28 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 10.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-27  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-92712-4@http.gcc.gnu.org/bugzilla/>
2020-09-02  4:46 ` [Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values fxue at os dot amperecomputing.com
2020-09-02  6:20 ` glisse at gcc dot gnu.org
2021-05-14  9:52 ` [Bug tree-optimization/92712] [9 " jakub at gcc dot gnu.org
2021-06-01  8:15 ` rguenth at gcc dot gnu.org
2022-05-27  8:40 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).