[C++] Mixed scalar-vector operations
Jason Merrill
jason@redhat.com
Sat Oct 6 06:05:00 GMT 2012
On 10/05/2012 07:09 PM, Marc Glisse wrote:
> [LR]SHIFT_EXPR are special and also accept to have a vector as first
> argument and a scalar as second argument (but not the reverse).
Fair enough.
> These 2 lines are in a switch in the case where scalar_to_vector
> returned stv_firstarg, meaning that the first arg (op0) is a scalar that
> needs to be converted to a vector of the same type as op1.
Ah, I see. I just wasn't reading closely enough.
> I think I should at least change the comment on scalar_to_vector from:
>
> /* Convert scalar to vector for the range of operations. */
>
> to something like:
>
> /* Determine which of the operands, if any, is a scalar that needs to be
> converted to a vector for the range of operations. */
> And add something in scalar_to_vector about the SHIFT_EXPRs.
Makes sense.
Jason
More information about the Gcc-patches
mailing list