On 6/19/24 21:06, Richard Biener wrote:


Am 19.06.2024 um 20:25 schrieb Toon Moene <t...@moene.org>:

On 6/17/24 16:05, Richard Biener wrote:

Automatic arrays that are not address-taken should not be subject to
store data races.  This applies to OMP SIMD in-branch lowered
functions result array which for the testcase otherwise prevents
vectorization with SSE and for AVX and AVX512 ends up with spurious
.MASK_STORE to the stack surviving.

Does this also apply for "automatic arrays" as defined by the Fortran Standard 
(see https://j3-fortran.org/doc/year/23/23-007r1.pdf, page 104), i.e., outside of the 
OMP_SIMD construct ?

In gfortran, when using the option -fstack-arrays, they are assigned memory 
space on the stack.

I’d say yes though the likelihood those are address taken and thus not 
considered is high.  The main target were the arrays created as part of the 
SIMD lowering.

Isn't there a "not" missing before "high" ?

So it mostly helps after the call to subroutine 'sub' in the following:

SUBROUTINE AAP(A, B, N)
INTEGER N
REAL A(N), B(N), R(N)
CALL SUB(R, N) ! Address of R passed to SUB
R = ABS(A)
B = R
B = SQRT(A)
END

?
--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands

Reply via email to