[Bug tree-optimization/113323] ICE: tree check: expected none of vector_type, have vector_type in bitint_precision_kind, at gimple-lower-bitint.cc:131 with _BitInt()

2024-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113323

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug tree-optimization/113323] ICE: tree check: expected none of vector_type, have vector_type in bitint_precision_kind, at gimple-lower-bitint.cc:131 with _BitInt()

2024-01-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113323

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/113323] ICE: tree check: expected none of vector_type, have vector_type in bitint_precision_kind, at gimple-lower-bitint.cc:131 with _BitInt()

2024-01-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113323

--- Comment #2 from GCC Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:a2d66158541c0923620b044098bf66a73b51c463

commit r14-7180-ga2d66158541c0923620b044098bf66a73b51c463
Author: Jakub Jelinek 
Date:   Fri Jan 12 11:20:40 2024 +0100

lower-bitint: Fix a typo in a condition [PR113323]

The following testcase revealed a typo in condition, as the comment
says the intent is
   /*  If lhs of stmt is large/huge _BitInt SSA_NAME not in m_names
   it means it will be handled in a loop or straight line code
   at the location of its (ultimate) immediate use, so for
   vop checking purposes check these only at the ultimate
   immediate use.  */
but the condition was using != BITINT_TYPE rather than == BITINT_TYPE,
so e.g. it used bitint_precision_kind on non-BITINT_TYPEs (e.g. on vector
types it will crash because TYPE_PRECISION means something different there,
or on say INTEGER_TYPEs the precision will never be large enough to be >=
bitint_prec_large).

The following patch fixes that.

2024-01-12  Jakub Jelinek  

PR tree-optimization/113323
* gimple-lower-bitint.cc (bitint_dom_walker::before_dom_children):
Fix
check for lhs being large/huge _BitInt not in m_names.

* gcc.dg/bitint-68.c: New test.

[Bug tree-optimization/113323] ICE: tree check: expected none of vector_type, have vector_type in bitint_precision_kind, at gimple-lower-bitint.cc:131 with _BitInt()

2024-01-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113323

Jakub Jelinek  changed:

   What|Removed |Added

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

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

Untested fix.