[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2021-08-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56275

Andrew Pinski  changed:

   What|Removed |Added

 CC||ebuddington at wesleyan dot edu

--- Comment #10 from Andrew Pinski  ---
*** Bug 51831 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread franxisco1988+gcc at gmail dot com


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



--- Comment #9 from klondike  2013-02-11 
19:25:15 UTC ---

Thanks again Uros, it's amazing how fast you have fixed this :D


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread ubizjak at gmail dot com


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



Uros Bizjak  changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

URL||http://gcc.gnu.org/ml/gcc-p

   ||atches/2013-02/msg00438.htm

   ||l

 Resolution||FIXED



--- Comment #8 from Uros Bizjak  2013-02-11 19:22:14 
UTC ---

Fixed everywhere.


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread uros at gcc dot gnu.org


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



--- Comment #7 from uros at gcc dot gnu.org 2013-02-11 17:30:06 UTC ---

Author: uros

Date: Mon Feb 11 17:29:53 2013

New Revision: 195947



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195947

Log:

Backport from mainline

2013-02-11  Uros Bizjak  



PR rtl-optimization/56275

* simplify-rtx.c (avoid_constant_pool_reference): Check that

offset is non-negative and less than cmode size before

calling simplify_subreg.



testsuite/ChangeLog



Backport from mainline

2013-02-11  Uros Bizjak  



PR rtl-optimization/56275

* gcc.dg/pr56275.c: New test.





Added:

branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr56275.c

Modified:

branches/gcc-4_6-branch/gcc/ChangeLog

branches/gcc-4_6-branch/gcc/simplify-rtx.c

branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread uros at gcc dot gnu.org


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



--- Comment #6 from uros at gcc dot gnu.org 2013-02-11 17:27:39 UTC ---

Author: uros

Date: Mon Feb 11 17:27:30 2013

New Revision: 195946



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195946

Log:

Backport from mainline

2013-02-11  Uros Bizjak  



PR rtl-optimization/56275

* simplify-rtx.c (avoid_constant_pool_reference): Check that

offset is non-negative and less than cmode size before

calling simplify_subreg.



testsuite/ChangeLog:



Backport from mainline

2013-02-11  Uros Bizjak  



PR rtl-optimization/56275

* gcc.dg/pr56275.c: New test.





Added:

branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr56275.c

Modified:

branches/gcc-4_7-branch/gcc/ChangeLog

branches/gcc-4_7-branch/gcc/simplify-rtx.c

branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread franxisco1988+gcc at gmail dot com


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



--- Comment #5 from klondike  2013-02-11 
16:10:49 UTC ---

Thanks Uros, for now I'll disable the code for gcc <= 4.6.3 if SSE2 is not

available to prevent the crash on older distros.


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-11 Thread uros at gcc dot gnu.org


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



--- Comment #4 from uros at gcc dot gnu.org 2013-02-11 16:05:51 UTC ---

Author: uros

Date: Mon Feb 11 16:05:44 2013

New Revision: 195944



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195944

Log:

PR rtl-optimization/56275

* simplify-rtx.c (avoid_constant_pool_reference): Check that

offset is non-negative and less than cmode size before

calling simplify_subreg.



testsuite/ChangeLog:



PR rtl-optimization/56275

* gcc.dg/pr56275.c: New test.





Added:

trunk/gcc/testsuite/gcc.dg/pr56275.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/simplify-rtx.c

trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-10 Thread ubizjak at gmail dot com


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



Uros Bizjak  changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |ubizjak at gmail dot com

   |gnu.org |



--- Comment #3 from Uros Bizjak  2013-02-10 16:16:12 
UTC ---

Created attachment 29412

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29412

Proposed patch



Patch in testing.


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-10 Thread ubizjak at gmail dot com


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



--- Comment #2 from Uros Bizjak  2013-02-10 16:15:13 
UTC ---

More reduced testcase



--cut here--

typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long;



void tiger_block_v2 (long long in1, v2tw *res)

{

  v2tw i1 = { in1, in1 };



  *res = i1 << 1;

}

--cut here--


[Bug rtl-optimization/56275] ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.

2013-02-10 Thread ubizjak at gmail dot com


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



Uros Bizjak  changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-02-10

  Component|other   |rtl-optimization

  Known to work||4.7.3, 4.8.0

   Target Milestone|--- |4.6.4

 Ever Confirmed|0   |1



--- Comment #1 from Uros Bizjak  2013-02-10 14:55:03 
UTC ---

Confirmed, latent on 4.7+.



I'm testing following patch:



--cut here--

Index: simplify-rtx.c

===

--- simplify-rtx.c  (revision 195496)

+++ simplify-rtx.c  (working copy)

@@ -188,7 +188,8 @@

   /* If we're accessing the constant in a different mode than it was

  originally stored, attempt to fix that up via subreg simplifications.

  If that fails we have no choice but to return the original memory. 

*/

-  if (offset != 0 || cmode != GET_MODE (x))

+  if ((offset != 0 || cmode != GET_MODE (x))

+ && offset < GET_MODE_SIZE (cmode))

 {

   rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);

   if (tem && CONSTANT_P (tem))

--cut here--