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: [PATCH] Fix Alpha vector builtins


On Tue, Apr 15, 2008 at 11:47 AM, Falk Hueffner <falk@debian.org> wrote:
> Hi,
>
>  more strict checking produced ICEs with Alpha vector builtins such as
>  __builtin_alpha_maxsw4:
>
>  test.c:7: error: invalid types in nop conversion
>  long int
>  vector short int
>  D.1254 = (long int) D.1253
>  test.c:7: internal compiler error: verify_gimple failed
>
>  This patch is tested with c,c++,fortran,objc on alphaev68-linux.
>  Thanks to Richard Guenther and Andrew Pinski for coming up with the
>  fix.

Ok.

Thanks,
Richard.

>  2008-04-15  Falk Hueffner  <falk@debian.org>
>
>         * config/alpha/alpha.c (alpha_fold_vector_minmax): Use
>         fold_build1 (VIEW_CONVERT_EXPR, ...)  for conversions.
>
>
>  Index: gcc/config/alpha/alpha.c
>  ===================================================================
>  --- gcc/config/alpha/alpha.c    (revision 134257)
>  +++ gcc/config/alpha/alpha.c    (working copy)
>  @@ -6768,10 +6768,10 @@
>   static tree
>   alpha_fold_vector_minmax (enum tree_code code, tree op[], tree vtype)
>   {
>  -  tree op0 = fold_convert (vtype, op[0]);
>  -  tree op1 = fold_convert (vtype, op[1]);
>  +  tree op0 = fold_build1 (VIEW_CONVERT_EXPR, vtype, op[0]);
>  +  tree op1 = fold_build1 (VIEW_CONVERT_EXPR, vtype, op[1]);
>    tree val = fold_build2 (code, vtype, op0, op1);
>  -  return fold_convert (long_integer_type_node, val);
>  +  return fold_build1 (VIEW_CONVERT_EXPR, long_integer_type_node, val);
>   }
>
>   static tree
>


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