https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88938
Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com Target Milestone|--- |7.5 --- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> --- Patch in testing: --cut here-- diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8abff99cc626..88557f26c44c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -37215,6 +37215,16 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, unsigned char lsb_index = INTVAL (op1) & 0xFF; op1 = GEN_INT (length); op2 = GEN_INT (lsb_index); + + mode1 = insn_data[icode].operand[1].mode; + if (!insn_data[icode].operand[1].predicate (op0, mode1)) + op0 = copy_to_mode_reg (mode1, op0); + + mode0 = insn_data[icode].operand[0].mode; + if (target == 0 + || !register_operand (target, mode0)) + target = gen_reg_rtx (mode0); + pat = GEN_FCN (icode) (target, op0, op1, op2); if (pat) emit_insn (pat); --cut here--