[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2017-05-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2017-05-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue May 30 07:43:37 2017
New Revision: 248626

URL: https://gcc.gnu.org/viewcvs?rev=248626&root=gcc&view=rev
Log:
Backported from mainline
2016-11-22  Jakub Jelinek  

PR middle-end/78416
* expmed.c (expand_divmod): Use wide_int for computation of
op1_is_pow2.  Don't set it if op1 is 0.  Formatting fixes.
Use size <= HOST_BITS_PER_WIDE_INT instead of
HOST_BITS_PER_WIDE_INT >= size.

* gcc.dg/torture/pr78416.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr78416.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/expmed.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2016-12-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

--- Comment #5 from Jakub Jelinek  ---
Fixed for 6.3+ as well.

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2016-12-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Wed Dec  7 22:54:14 2016
New Revision: 243406

URL: https://gcc.gnu.org/viewcvs?rev=243406&root=gcc&view=rev
Log:
Backported from mainline
2016-11-22  Jakub Jelinek  

PR middle-end/78416
* expmed.c (expand_divmod): Use wide_int for computation of
op1_is_pow2.  Don't set it if op1 is 0.  Formatting fixes.
Use size <= HOST_BITS_PER_WIDE_INT instead of
HOST_BITS_PER_WIDE_INT >= size.

* gcc.dg/torture/pr78416.c: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr78416.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/expmed.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2016-11-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

Jakub Jelinek  changed:

   What|Removed |Added

  Known to work||7.0
  Known to fail|7.0 |

--- Comment #3 from Jakub Jelinek  ---
Fixed for 7.0 so far.

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2016-11-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 22 10:14:21 2016
New Revision: 242690

URL: https://gcc.gnu.org/viewcvs?rev=242690&root=gcc&view=rev
Log:
PR middle-end/78416
* expmed.c (expand_divmod): Use wide_int for computation of
op1_is_pow2.  Don't set it if op1 is 0.  Formatting fixes.
Use size <= HOST_BITS_PER_WIDE_INT instead of
HOST_BITS_PER_WIDE_INT >= size.

* gcc.dg/torture/pr78416.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78416.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expmed.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

2016-11-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78416

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-11-18
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Created attachment 40084
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40084&action=edit
gcc7-pr78416.patch

Untested fix.