[Bug target/60909] ICE: in extract_insn, at recog.c:2202 (unrecognizable insn) with -mrdrnd and __builtin_ia32_rdrand32_step()

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Apr 21 16:20:00 GMT 2014


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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-04-21
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
   Target Milestone|---                         |4.7.4
     Ever confirmed|0                           |1

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
I have a patch in testing (rdseed is affected by similar problem):

--cut here--
Index: i386.c
===================================================================
--- i386.c      (revision 209544)
+++ i386.c      (working copy)
@@ -35400,7 +35400,8 @@ rdrand_step:
       else
        op2 = gen_rtx_SUBREG (SImode, op0, 0);

-      if (target == 0)
+      if (target == 0
+         || !register_operand (target, SImode))
        target = gen_reg_rtx (SImode);

       pat = gen_rtx_GEU (VOIDmode, gen_rtx_REG (CCCmode, FLAGS_REG),
@@ -35442,7 +35443,8 @@ rdseed_step:
                          const0_rtx);
       emit_insn (gen_rtx_SET (VOIDmode, op2, pat));

-      if (target == 0)
+      if (target == 0
+         || !register_operand (target, SImode))
         target = gen_reg_rtx (SImode);

       emit_insn (gen_zero_extendqisi2 (target, op2));
--cut here--


More information about the Gcc-bugs mailing list