[libc-commits] [libc] [libc] [search] implement hcreate(_r)/hsearch(_r)/hdestroy(_r) (PR #73469)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Tue Nov 28 10:07:17 PST 2023
================
@@ -30,7 +29,7 @@ if (CPU_SUPPORTS_SSE2)
group_test.cpp
----------------
SchrodingerZhu wrote:
I removed extra tests. However, it occurs to me that `-mno-sse2` is somehow not added to compile options:
```
❯ ninja -v projects/libc/test/src/__support/HashTable/CMakeFiles/libc.test.src.__support.HashTable.group_test.__unit__.__build__.dir/group_test.cpp.o
[1/1] /usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/schrodingerzy/Documents/llvm/llvm-project/build/projects/libc/test/src/__support/HashTable -I/home/schrodingerzy/Documents/llvm/llvm-project/libc/test/src/__support/HashTable -I/home/schrodingerzy/Documents/llvm/llvm-project/libc -isystem /home/schrodingerzy/Documents/llvm/llvm-project/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -std=c++17 -fpie -ffreestanding -MD -MT projects/libc/test/src/__support/HashTable/CMakeFiles/libc.test.src.__support.HashTable.group_test.__unit__.__build__.dir/group_test.cpp.o -MF projects/libc/test/src/__support/HashTable/CMakeFiles/libc.test.src.__support.HashTable.group_test.__unit__.__build__.dir/group_test.cpp.o.d -o projects/libc/test/src/__support/HashTable/CMakeFiles/libc.test.src.__support.HashTable.group_test.__unit__.__build__.dir/group_test.cpp.o -c /home/schrodingerzy/Documents/llvm/llvm-project/libc/test/src/__support/HashTable/group_test.cpp
```
If I manually supply `-mno-sse2`, I can indeed get the desired code.
```
objdump -Sa projects/libc/test/src/__support/HashTable/CMakeFiles/libc.test.src.__support.HashTable.group_test.__unit__.__build__.dir/group_test.cpp.o | grep pmovmskb
```
https://github.com/llvm/llvm-project/pull/73469
More information about the libc-commits
mailing list