On Thu, 3 Jan 2019, Jakub Jelinek wrote:
> On Thu, Jan 03, 2019 at 06:32:44PM +0100, Marc Glisse wrote:
> > > That said, not sure if e.g. using an opaque builtin for the conversion
> > > that
> > > supportable_convert_operation sometimes uses is better over this ifn.
> > > What exact optimization
On Thu, 3 Jan 2019, Jakub Jelinek wrote:
On Thu, Jan 03, 2019 at 11:48:12AM +0100, Marc Glisse wrote:
The following patch adds support for the __builtin_convertvector builtin.
C casts on generic vectors are just reinterpretation of the bits (i.e. a
VCE), this builtin allows to cast int/unsigned
+/* Build a VEC_CONVERT ifn for __builtin_convertvector builtin. */
Can you please document the function arguments and explain how they
are used?
+
+tree
+c_build_vec_convert (location_t loc1, tree expr, location_t loc2, tree type,
+bool complain)
+{
+ if (error_operand_p
Jakub Jelinek writes:
> + /* Can't use get_compute_type here, as supportable_convert_operation
> + doesn't necessarily use an optab and needs two arguments. */
> + tree vector_compute_type
> + = type_for_widest_vector_mode (TREE_TYPE (arg_type), mov_optab);
> + unsigned HO
On Thu, Jan 03, 2019 at 12:16:31PM +0100, Richard Biener wrote:
> I guess it depends on target capabilities - I think
> __builtin_convertvector is a bit "misdesigned" for pack/unpack. You
> also have to consider a v2di to v2qi conversion which requires
I'm aware of that, I know supportable_{widen
On Thu, 3 Jan 2019, Jakub Jelinek wrote:
> Hi!
>
> The following patch adds support for the __builtin_convertvector builtin.
> C casts on generic vectors are just reinterpretation of the bits (i.e. a
> VCE), this builtin allows to cast int/unsigned elements to float or vice
> versa or promote/dem
On Thu, Jan 03, 2019 at 11:48:12AM +0100, Marc Glisse wrote:
> > The following patch adds support for the __builtin_convertvector builtin.
> > C casts on generic vectors are just reinterpretation of the bits (i.e. a
> > VCE), this builtin allows to cast int/unsigned elements to float or vice
> > ve
On Thu, 3 Jan 2019, Jakub Jelinek wrote:
The following patch adds support for the __builtin_convertvector builtin.
C casts on generic vectors are just reinterpretation of the bits (i.e. a
VCE), this builtin allows to cast int/unsigned elements to float or vice
versa or promote/demote them. doc/