This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Scalar vector binary operation


Patch pinging.

Can someone approve this, cause there are other patches waiting that
depend on this one.


Thanks,
Artem.

On Mon, Nov 1, 2010 at 4:16 PM, Artem Shinkarov
<artyom.shinkaroff@gmail.com> wrote:
> This patch allows binary operations: "vector <op> scalar" and "scalar
> <op> vector" in which case scalar is converted into the vector type,
> if the scalar type fits in the vectors element type.
>
> ChangeLog:
>
> 2010-11-01 ?Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
>
> ? ? ? /gcc
> ? ? ? * tree.c (build_vector_from_val): Build vector from scalar
> ? ? ? * tree.h (build_vector_from_val): New declaration
> ? ? ? * c-typeck.c (expr_fits_type_p): New function. Check if expression
> ? ? ? fits into the type considering constants.
> ? ? ? (scalar_to_vector): New function. Try scalar to vector conversion.
> ? ? ? (build_binary_op): Adjust.
> ? ? ? * doc/extend.texi: Description of scalar to vector expansion.
>
> ? ? ? /gcc/testsuite
> ? ? ? * gcc.c-torture/execute/scal-to-vec1.c: New test.
> ? ? ? * gcc.dg/scal-to-vec1.c: New test.
>
> bootstrapped and tested on x86_64_unknown-linux
>
> OK?
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]