This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/36438] gcc ICE compiling code with mmx builtin
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2008 12:50:18 -0000
- Subject: [Bug rtl-optimization/36438] gcc ICE compiling code with mmx builtin
- References: <bug-36438-16184@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from ubizjak at gmail dot com 2008-06-05 12:50 -------
There is a general problem with vector shifts by scalar operands. The code
assumed that both operands are vector mode operands, so it tries to add both
constant shift operands using V1DImode.
Following patch fixes ICE:
Index: cse.c
===================================================================
--- cse.c (revision 136389)
+++ cse.c (working copy)
@@ -3489,6 +3489,11 @@ fold_rtx (rtx x, rtx insn)
&& exact_log2 (- INTVAL (const_arg1)) >= 0)))
break;
+ /* ??? Vector mode shifts by scalar
+ shift operand are not supported yet. */
+ if (is_shift && VECTOR_MODE_P (mode))
+ break;
+
if (is_shift
&& (INTVAL (inner_const) >= GET_MODE_BITSIZE (mode)
|| INTVAL (inner_const) < 0))
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ubizjak at gmail dot com
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-06-05 11:53:55 |2008-06-05 12:50:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36438