Copilot commented on code in PR #62585:
URL: https://github.com/apache/doris/pull/62585#discussion_r3098879005
##########
be/CMakeLists.txt:
##########
@@ -383,6 +383,7 @@ if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR
"${CMAKE_BUILD_TARGET_ARCH}"
add_compile_options(-msse4.2)
add_definitions(-DLIBDIVIDE_SSE2)
if (USE_AVX2)
+ add_compile_options(-march=x86-64-v3)
Review Comment:
`-march=x86-64-v3` enables codegen for additional ISA beyond AVX2 (e.g.,
BMI1/BMI2/FMA/LZCNT/MOVBE). The runtime instruction gate in
`be/src/service/doris_main.cpp` currently only probes up to `__AVX2__` (no
checks for the extra x86-64-v3 features), and its failure message advises
rebuilding with `USE_AVX2=0`. This can lead to SIGILL on CPUs that have AVX2
but lack some v3-required features, or at minimum produce misleading
diagnostics. Consider either (a) keeping `-mavx2` without raising the baseline,
or (b) extending the early instruction checks + user-facing message to cover
the full x86-64-v3 requirements (or introduce a separate toggle for v3
baseline).
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]