https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77317

            Bug ID: 77317
           Summary: x86_64 --target_board=''unix/ unix/-m32'' parallel
                    testrun gives inconsistent results in gcc.dg/vect
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

I build a reference build of version r239639, and then build a patch for
PR71602 on top for that version, and tested both builds for x86_64 with
--target_board='unix/ unix/-m32' and -j12. 

I found these differences between the two test runs (which do not seem likely
to be caused by the va_arg/va_list related patch):
... 
+PASS: gcc.dg/vect/no-vfa-vect-dv-2.c scan-tree-dump-times vect "accesses have
the same alignment." 2
+PASS: gcc.dg/vect/vect-6-big-array.c -flto -ffat-lto-objects 
scan-tree-dump-times vect "Vectorizing an unaligned access" 0
-PASS: gcc.dg/vect/vect-6-big-array.c scan-tree-dump-times vect "Vectorizing an
unaligned access" 0
+PASS: gcc.dg/vect/vect-6.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"Vectorizing an unaligned access" 0
-PASS: gcc.dg/vect/vect-6.c scan-tree-dump-times vect "Vectorizing an unaligned
access" 0
-PASS: gcc.dg/vect/vect-91.c scan-tree-dump-times vect "accesses have the same
alignment." 3
...

The check that appears for no-vfa-vect-dv-2.c is:
...
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2
"vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
...

check_effective_target_vect_aligned_arrays caches the result:
...
        set et_vect_aligned_arrays_saved($et_index) 0
        if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
            if { ([is-effective-target lp64]
                  && ( ![check_avx_available]
                     || [check_prefer_avx128])) } {
                 set et_vect_aligned_arrays_saved($et_index) 1
            }
        }
...

lp64 is not the same between -m32 and -m64 runs, and should not be cached
between them.

This ( https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01099.html ) mentions the
same failure for no-vfa-vect-dv-2.c.

Reply via email to