removing -Ofast with aocc (#45880)

Co-authored-by: shbhaska <shbhaska@amd.com>
This commit is contained in:
AMD Toolchain Support 2024-08-23 01:54:58 +01:00 committed by GitHub
parent 823a2c1e4b
commit 8b811171c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -824,15 +824,20 @@ def cmake_args(self):
if spec.satisfies("%aocc"):
if spec.satisfies("+intel"):
cxx_flags = (
"-Ofast -fno-math-errno -fno-unroll-loops "
"-O3 -fno-math-errno -fno-unroll-loops "
"-fveclib=AMDLIBM -muse-unaligned-vector-move"
)
if spec.satisfies("%aocc@4.1:"):
cxx_flags += (
" -mllvm -force-gather-overhead-cost=50"
" -mllvm -enable-masked-gather-sequence=false"
)
# add -fopenmp-simd if OpenMP not already turned on
if spec.satisfies("~openmp"):
cxx_flags += " -fopenmp-simd"
cxx_flags += " -DLMP_SIMD_COMPILER -DUSE_OMP_SIMD -DLMP_INTEL_USELRT"
else:
cxx_flags = "-Ofast -mfma -fvectorize -funroll-loops"
cxx_flags = "-O3 -mfma -fvectorize -funroll-loops"
args.append(self.define("CMAKE_CXX_FLAGS_RELEASE", cxx_flags))
args.append(self.define("CMAKE_CXX_FLAGS_RELWITHDEBINFO", cxx_flags))