On 08/23/2016 02:15 AM, Robert Suchanek wrote:
Hi,

unfortunately this broke make check-c
RUNTESTFLAGS='vect.exp=*no-vfa-vect-dv-2.c
--target_board=unix\{-m32,-m64\}', causing the check if
vect_aligned_arrays to be cached between the -m64 and -m32 variants
which is incorrect at least on my machine if you actually run that test
for -m32 and -m64 you get different results.  In both case et_index is 0
so you use the cached value the second time, but that's not correct
because the options changed.

I suspect this also causes some random vectorizer tests to appear and
disappear during regression testing with the same -m64 and -m32, but I'm
not absolutely sure of that part.

Thanks!

Trev

I was misled by the comments in a few procedures suggesting that the results
should have been cached and the use of global variable looked mistyped.
Comments wrong, surely you jest :-)


The following patch reverts to the old behaviour. I also removed misleading
comments and related logic that checks for the cached result.  There might be
other procedures with similar inconsistency but here I only modified the 
offending ones.
Thanks. Given how much cut-n-paste we do with the tcl code there's a good chance this problem exists elsewhere. I don't start ranting about tcl/dejagnu, I'll just put me in a terrible mood for the rest of the day.


Alternatively, it would be possible to switch to the new method and do the 
caching
but it is more intrusive change that requires careful analysis of the results
and the tests will not likely be directly comparable with old results (because 
of
flag mixing into the test names).  It's safer to restore the original behaviour
as the patch was not supposed to change any existing results.
I'd go with the safer approach for now -- I keep holding out hope that there's a silver bullet out there that will allow us to replace dejagnu and all its tcl goop some day.


Ok to apply?

Regards,
Robert

gcc/testsuite/
        * lib/target-supports.exp
        (check_effective_target_vect_aligned_arrays): Don't cache the result.
        (check_effective_target_vect_natural_alignment): Ditto.
        (check_effective_target_vector_alignment_reachable): Ditto.
        (check_effective_target_vector_alignment_reachable_for_64bit): Ditto.
OK.
jeff

Reply via email to