public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
       [not found] <bug-23096-4@http.gcc.gnu.org/bugzilla/>
@ 2024-04-17  8:10 ` rguenth at gcc dot gnu.org
  2024-04-17 17:25 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-17  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Writing a self-test for this shows we do not fold (51 - 7) %[fl] 3.  But
I can't spot substantial differences in the PLUS/MINUS_EXPR handling.  In
particular we still do MINUS->PLUS by negating op1.

So I'm not sure the original issue was really folding with those constants?

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

* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
       [not found] <bug-23096-4@http.gcc.gnu.org/bugzilla/>
  2024-04-17  8:10 ` [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR rguenth at gcc dot gnu.org
@ 2024-04-17 17:25 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-17 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|WAITING                     |RESOLVED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I only filed this bug to keep track of the what was described as the underlying
issue for PR 22348 but since that is proved to maybe not be so let's close this
as works for me.

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

* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
  2005-07-27 16:36 [Bug middle-end/23096] New: " pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
@ 2005-07-27 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 16:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-27 16:38 -------
>From comment #7 of PR 22348:
extract_muldiv(51 - 7, 3, FLOOR_MOD_EXPR) returns incorrectly 0.

The reason is that 51 - 7 is replaced with 51 + ~6, and both 51 and ~6 are
divisible by 3, so the result obviously is 0 :-) Someone forgot about overflows.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23096


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

* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
  2005-07-27 16:36 [Bug middle-end/23096] New: " pinskia at gcc dot gnu dot org
@ 2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
  2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 16:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-27 16:38:06
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23096


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

* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
  2005-07-27 16:36 [Bug middle-end/23096] New: " pinskia at gcc dot gnu dot org
  2005-07-27 16:38 ` [Bug middle-end/23096] " pinskia at gcc dot gnu dot org
@ 2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
  2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
  2005-07-27 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 16:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|22348                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23096


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

* [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR
  2005-07-27 16:36 [Bug middle-end/23096] New: " pinskia at gcc dot gnu dot org
  2005-07-27 16:38 ` [Bug middle-end/23096] " pinskia at gcc dot gnu dot org
  2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
@ 2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
  2005-07-27 16:40 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 16:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |22348
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23096


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

end of thread, other threads:[~2024-04-17 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23096-4@http.gcc.gnu.org/bugzilla/>
2024-04-17  8:10 ` [Bug middle-end/23096] Wrong folding for FLOOR_MOD_EXPR rguenth at gcc dot gnu.org
2024-04-17 17:25 ` pinskia at gcc dot gnu.org
2005-07-27 16:36 [Bug middle-end/23096] New: " pinskia at gcc dot gnu dot org
2005-07-27 16:38 ` [Bug middle-end/23096] " pinskia at gcc dot gnu dot org
2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
2005-07-27 16:38 ` pinskia at gcc dot gnu dot org
2005-07-27 16:40 ` pinskia at gcc dot gnu dot 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).