microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
9.88k stars 1.45k forks source link

Work around a compiler back-end assertion in vectorized minmax #4739

Closed StephanTLavavej closed 1 week ago

StephanTLavavej commented 1 week ago

After merging #4659, the MSVC-internal "selfbuild" CI (where the freshly built compiler is used to build itself again) failed. I've reported VSO-2093761 "amd64chk vect_opcode.cpp assertion entryIsaRequirement <= isaRequirement when compiling the STL's vectorized minmax".

Thanks to @AlexGuteniev for suggesting #pragma loop(no_vector) as a workaround. (The problem involves the optimizer getting confused by manually vectorized code followed by auto-vectorized code.)