Skip to content

Commit dda107b

Browse files
authored
Revert "[libc][bazel] Enable software prefetching for memcpy" (#111370)
Reverts #108939 When `AVX` is available but `-mprefer-vector-width=128` some of the `mov` instructions turn into the x86 `rep;movsb` instruction leading to poor performance on "old" architectures (sandybridge, haswell). The possible solutions are : get rid of the `-mprefer-vector-width` option or use smaller static copy sizes in `inline_memcpy_x86_sse2_ge64_sw_prefetching`. Right now a copy size of 3 cache lines (192B) relying exclusively on xmm registers gets turned into `rep;movsb`.
1 parent 91d6e77 commit dda107b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LIBC_CONFIGURE_OPTIONS = [
2424
# Documentation in libc/src/string/memory_utils/...
2525
# "LIBC_COPT_MEMCPY_USE_EMBEDDED_TINY",
2626
# "LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE",
27-
"LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING",
27+
# "LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING",
2828
"LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING",
2929

3030
# Documentation in libc/docs/dev/printf_behavior.rst

0 commit comments

Comments
 (0)