[Bug target/65676] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mavx512f -funsigned-char and __builtin_ia32_pmovsxwq512_mask()

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 7 11:34:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65676

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Following patch:

--cut here--
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 221888)
+++ config/i386/i386.c  (working copy)
@@ -37509,6 +37509,10 @@ ix86_expand_args_builtin (const struct builtin_des
          if (memory_operand (op, mode))
            num_memory++;

+         /* Fixup modeless constants to fit required mode.  */
+         if (GET_MODE (op) == VOIDmode)
+           op = convert_to_mode (mode, op, 1);
+
          if (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)
            {
              if (optimize || !match || num_memory > 1)
--cut here--

fixes the testcase failure. This fixup is needed everywhere we have builtin
with QImode operands.


More information about the Gcc-bugs mailing list