[all-commits] [llvm/llvm-project] cd0143: tsan: switch from SSE3 to SSE4.2

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Jul 28 22:51:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd0143c0f2a37332a1f7e29caa122db74b92a344
      https://github.com/llvm/llvm-project/commit/cd0143c0f2a37332a1f7e29caa122db74b92a344
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M compiler-rt/lib/tsan/CMakeLists.txt
    M compiler-rt/lib/tsan/go/build.bat
    M compiler-rt/lib/tsan/go/buildgo.sh

  Log Message:
  -----------
  tsan: switch from SSE3 to SSE4.2

Switch x86_64 requirement for optimized code from SSE3 to SSE4.2.
The new tsan runtime will need few instructions that are only
supported by SSE4:

_mm_max_epu32
_mm_extract_epi8
_mm_insert_epi32

SSE3 was introcued in 2004 and SSE4 in 2006:
https://en.wikipedia.org/wiki/SSE3
https://en.wikipedia.org/wiki/SSE4

We are still providing non-optimized C++ version of the code,
so either way it's possible to build tsan runtime for any CPU.

But for Go this will bump strict requirement for -race because
Go contains prebuilt versions and these will be built with -msse4.2.
But requiring a CPU produced at least in 2006 looks reasonable for
a debugging tool (more reasonable than disabling optimizations
for everybody).

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106948




More information about the All-commits mailing list