This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Scalar vector binary operation
- From: Artem Shinkarov <artyom dot shinkaroff at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Guenther <richard dot guenther at gmail dot com>
- Date: Wed, 3 Nov 2010 13:23:19 +0000
- Subject: Re: Scalar vector binary operation
- References: <AANLkTi=UguCY9pZBg5N_K-NHcVSEA=8UTLhtWPjVtdiO@mail.gmail.com>
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?
>