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: Ping: Patch to fix thousands of Altivec test failures on mainline


> I'm pinging for Andrew's patch from December 2 (I hope he doesn't mind)
>
> http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00110.html
>
> which I've further bootstrapped and tested on powerpc64-apple-
> darwin8.8.0 with -mcpu=970 enabled (so that altivec is used in the
> vectorizer testcases).  More than 5,000 mainly fortran test failures
> are fixed,
>
> http://gcc.gnu.org/ml/gcc-testresults/2006-12/msg00687.html
>
> so this patch helps other problems to be noticed when they might occur.
>

Second that - I also bootstrapped on ppc64-yellowdog-linux.

Making the mask_for_load builtin const was introduced here:

2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
        ...
        * rs6000.c (altivec_init_builtins): Declare builtin function
        __builtin_altivec_mask_for_load to be "const".

As part of Keith's attempt to incrementally preserve ssa form when
vectorizing (http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01345.html):

"Make __builtin_altivec_mask_for_load a "const" builtin function so that
the only use of  mark_call_clobbered_vars_to_rename by the vectorizer can
be removed.":

*************** vectorizable_load (tree stmt, block_stmt
*** 1093,1101 ****
        gcc_assert (!new_bb);
        magic = TREE_OPERAND (new_stmt, 0);

!       /* Since we have just created a CALL_EXPR, we may need to
!          rename call-clobbered variables.  */
!       mark_call_clobbered_vars_to_rename ();
      }
        else
      {
--- 1095,1106 ----
        gcc_assert (!new_bb);
        magic = TREE_OPERAND (new_stmt, 0);

!       /* The result of the CALL_EXPR to this builtin is determined from
!          the value of the parameter and no global variables are touched
!          which makes the builtin a "const" function.  Requiring the
!          builtin to have the "const" attribute makes it unnecessary
!          to call mark_call_clobbered_vars_to_rename.  */
!       gcc_assert (TREE_READONLY (builtin_decl));
      }
        else
      {

So seems like setting the decl to TREE_READONLY, as Andrew proposed, is
really what we want here.

dorit

> Brad


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