This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix PR middle-end/22480
On Fri, Sep 09, 2005 at 12:07:41PM +0200, Uros Bizjak wrote:
> + if (code == LSHIFT_EXPR || code == RSHIFT_EXPR)
> + {
> + /* Vector shl and shr insn patterns can be defined with
> + scalar operand 2 (shift operand). In this case, use
> + constant or loop invariant op1 directly, without
> + extending it to vector mode first. */
> +
> + optab_op2_mode = insn_data[icode].operand[2].mode;
> + if (VECTOR_MODE_P (vec_mode)
> + && !VECTOR_MODE_P (optab_op2_mode)
> + && (dt == vect_constant_def
> + || dt == vect_invariant_def))
> + {
> + if (vect_print_dump_info (REPORT_DETAILS))
> + fprintf (vect_dump, "operand 1 using scalar mode.");
> + vec_oprnd1 = op1;
> + }
> + }
> +
> + if (!vec_oprnd1)
> + vec_oprnd1 = vect_get_vec_def_for_operand (op1, stmt, NULL);
I must be missing something. At what point do you fail the transformation
because op2 is *not* invariant?
r~