-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[simd][error] construct simd:scalar from minmax fail #51
Comments
clamp still WIP
I've tried to give a fix for minmax and clamp in ABI scalar. See as following: But I tried it with your test cases, there are still failings in min/max/minmax/clamp. I'm not sure if there are issues in test cases. |
it's interesting. Oh in my local, under the latest compile command (also called gitlab-ci.yml) will fail, but it works well on the old one. see the commit change 3839711 edit1: I will update some commits to fix later. |
edit1:sorry, the bug is due to origin:@joy2myself Hi, I push a new commit aab830f that will pass the 4 tests under simd/simd.alg directory. Basically, I forbade the type"long double", and it works well. It's cost time to run all test, so I strongly recommend reduce the error log(with long double)error logclang-14: /root/llvm-project/clang/lib/Sema/SemaExpr.cpp:12287: clang::QualType clang::Sema::GetSignedVectorType(clang::QualType):
Assertion `TypeSize == Context.getTypeSize(Context.CharTy) && "Unhandled vector element size in vector compare"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /root/llvm-project/latest_build/build/bin/clang-14 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend
-main-file-name min.pass.cpp -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/root/llvm-project/latest_build/build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/std/experimental/simd/simd.alg -nostdinc++ -resource-dir /root/llvm-project/latest_build/build/lib/clang/14.0.0 -include /root/llvm-project/libcxx/test/support/nasty_macros.h -I /root/llvm-project/latest_build/build/include/x86_64-unknown-linux-gnu/c++/v1 -I /root/llvm-project/latest_build/build/include/c++/v1 -I /root/llvm-project/latest_build/build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/include/c++build -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I /root/llvm-project/libcxx/test/support -D _LIBCPP_DISABLE_AVAILABILITY -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D _LIBCPP_HAS_THREAD_API_PTHREAD -D _LIBCPP_ABI_VERSION=1 -internal-isystem /root/llvm-project/latest_build/build/lib/clang/14.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Werror=thread-safety -Wuser-defined-warnings -Wno-macro-redefined -Wno-macro-redefined -std=c++2b -fdeprecated-macro -fdebug-compilation-dir=/root/llvm-project/latest_build/build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/std/experimental/simd/simd.alg -ferror-limit 19 -fcoroutines-ts -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/min-b3efda.o -x c++ /root/llvm-project/libcxx/test/std/experimental/simd/simd.alg/min.pass.cpp
1. <eof> parser at end of file
2. /root/llvm-project/libcxx/test/std/experimental/simd/simd.alg/../test_util.h:29:6: instantiating function definition 'test_all_simd_abi<CheckMinTrue>'
3. /root/llvm-project/libcxx/test/std/experimental/simd/simd.alg/../test_util.h:20:6: instantiating function definition 'test_all_simd_abi<CheckMinTrue, long double, 0UL, 1UL, 2UL, 3UL, 4UL, 5UL, 6UL, 7UL, 8UL, 9UL, 10UL, 11UL, 12UL, 13UL, 14UL, 15UL, 16UL, 17UL, 18UL, 19UL, 20UL, 21UL, 22UL, 23UL, 24UL, 25UL, 26UL, 27UL, 28UL, 29UL, 30UL, 31UL, 32UL, 33UL, 34UL, 35UL, 36UL, 37UL, 38UL, 39UL, 40UL, 41UL, 42UL, 43UL, 44UL, 45UL, 46UL, 47UL, 48UL, 49UL, 50UL, 51UL, 52UL, 53UL, 54UL, 55UL, 56UL, 57UL, 58UL, 59UL, 60UL, 61UL, 62UL, 63UL>'
4. /root/llvm-project/libcxx/test/std/experimental/simd/simd.alg/../test_util.h:17:6: instantiating function definition 'test_simd_abi<CheckMinTrue, 64UL, long double, std::experimental::simd_abi::__vec_ext<1>, std::experimental::simd_abi::__vec_ext<64>, std::experimental::simd_abi::__scalar, std::experimental::simd_abi::__vec_ext<1>, std::experimental::simd_abi::__vec_ext<64>>'
5. /root/llvm-project/libcxx/test/std/experimental/simd/simd.alg/min.pass.cpp:36:8: instantiating function definition 'CheckMinTrue::operator()<long double, std::experimental::simd_abi::__vec_ext<1>>'
6. /root/llvm-project/latest_build/build/include/c++/v1/experimental/simd:1709:15: instantiating function definition 'std::experimental::min<long double, std::experimental::simd_abi::__vec_ext<1>>'
7. /root/llvm-project/latest_build/build/include/c++/v1/__simd/abi/builtin.h:119:16: instantiating function definition 'std::experimental::__simd_traits<long double, std::experimental::simd_abi::__vec_ext<1>>::__min'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/root/llvm-project/latest_build/build/bin/clang-14(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x40)[0x5609f18fb818]
/root/llvm-project/latest_build/build/bin/clang-14(+0x4c148df)[0x5609f18fb8df]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN4llvm3sys17RunSignalHandlersEv+0x8c)[0x5609f18f9498]
/root/llvm-project/latest_build/build/bin/clang-14(+0x4c14149)[0x5609f18fb149]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f0d7ef1a520]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f0d7ef6ea7c]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f0d7ef1a476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f0d7ef007f3]
/lib/x86_64-linux-gnu/libc.so.6(+0x2871b)[0x7f0d7ef0071b]
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x7f0d7ef11e96]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema19GetSignedVectorTypeENS_8QualTypeE+0x535)[0x5609f53dcd89]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema26CheckVectorCompareOperandsERNS_12ActionResultIPNS_4ExprELb1EEES5_NS_14SourceLocationENS_18BinaryOperatorKindE+0x349)[0x5609f53dd131]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema20CheckCompareOperandsERNS_12ActionResultIPNS_4ExprELb1EEES5_NS_14SourceLocationENS_18BinaryOperatorKindE+0x3c6)[0x5609f53d9fe6]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema18CreateBuiltinBinOpENS_14SourceLocationENS_18BinaryOperatorKindEPNS_4ExprES4_+0xb3b)[0x5609f53e5f6d]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f7e141)[0x5609f5c65141]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f60349)[0x5609f5c47349]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f506d4)[0x5609f5c376d4]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f59d8a)[0x5609f5c40d8a]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f500c8)[0x5609f5c370c8]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f57e88)[0x5609f5c3ee88]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f62737)[0x5609f5c49737]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f50cb5)[0x5609f5c37cb5]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f57313)[0x5609f5c3e313]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f7a5e9)[0x5609f5c615e9]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f5661c)[0x5609f5c3d61c]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f8175c)[0x5609f5c6875c]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f740fd)[0x5609f5c5b0fd]
/root/llvm-project/latest_build/build/bin/clang-14(+0x8f55881)[0x5609f5c3c881]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema9SubstStmtEPNS_4StmtERKNS_30MultiLevelTemplateArgumentListE+0xa8)[0x5609f5c33a62]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xd56)[0x5609f5c9eb1e]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(+0x90020e2)[0x5609f5ce90e2]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xef3)[0x5609f5c9ecbb]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(+0x90020e2)[0x5609f5ce90e2]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xef3)[0x5609f5c9ecbb]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(+0x90020e2)[0x5609f5ce90e2]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xef3)[0x5609f5c9ecbb]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(+0x90020e2)[0x5609f5ce90e2]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xef3)[0x5609f5c9ecbb]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(+0x90020e2)[0x5609f5ce90e2]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb+0xef3)[0x5609f5c9ecbb]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema28PerformPendingInstantiationsEb+0x202)[0x5609f5ca334e]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema33ActOnEndOfTranslationUnitFragmentENS0_14TUFragmentKindE+0x2c4)[0x5609f4f12a28]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang4Sema25ActOnEndOfTranslationUnitEv+0x10b)[0x5609f4f12cc3]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang6Parser17ParseTopLevelDeclERNS_9OpaquePtrINS_12DeclGroupRefEEEb+0x4ea)[0x5609f4d9a852]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang8ParseASTERNS_4SemaEbb+0x2b8)[0x5609f4d95f01]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang17ASTFrontendAction13ExecuteActionEv+0x147)[0x5609f27c1967]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang13CodeGenAction13ExecuteActionEv+0x6a)[0x5609f3247074]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang14FrontendAction7ExecuteEv+0x9e)[0x5609f27c1216]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x3bf)[0x5609f26f9b6b]
/root/llvm-project/latest_build/build/bin/clang-14(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x3b3)[0x5609f2968b09]
/root/llvm-project/latest_build/build/bin/clang-14(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x619)[0x5609ee28ff9f]
/root/llvm-project/latest_build/build/bin/clang-14(+0x159c873)[0x5609ee283873]
/root/llvm-project/latest_build/build/bin/clang-14(main+0x4f0)[0x5609ee283fad]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f0d7ef01d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f0d7ef01e40]
/root/llvm-project/latest_build/build/bin/clang-14(_start+0x25)[0x5609ee281f85]
clang-14: error: unable to execute command: Aborted (core dumped)
clang-14: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 14.0.0 (https://github.com/joy2myself/llvm-project 76e2d2c5d64aaaa993d459bb4518b1d693ad14ec)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /root/llvm-project/latest_build/build/./bin |
clamp still WIP
clamp still WIP
clamp still WIP
clamp still WIP
clamp still WIP
clamp still WIP
Co-authored-by: melonedo <[email protected]>
What happens
call the ex::minmax function from simd_abi::scalar will fail. the issue seems due to the std::pair
While other simd_abi work well.
code snippet
environment:
clang14 -std=c++17
error log
error log
The text was updated successfully, but these errors were encountered: