This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fold VEC_PERM_EXPR/VEC_INTERLEAVE*EXPR/VEC_EXTRACT*EXPR with VECTOR_CST/CONSTRUCTOR arguments (PR tree-optimization/51074, take 2)
On Fri, Nov 11, 2011 at 08:36:36AM -0800, Richard Henderson wrote:
> Ok, except
>
> > + elts[i]
> > + = fold_convert (TREE_TYPE (TREE_TYPE (arg)), integer_zero_node);
>
> build_int_cst.
That would work for integer modes only, but here the type can be REAL_TYPE
too. I think fold_convert from integer_zero_mode to any time is what is
the most common idiom to create zero
INTEGER_CSTs/COMPLEX_CSTs/REAL_CSTs/FIXED_CSTs of any type.
Jakub