This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/36438] gcc ICE compiling code with mmx builtin



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]