openmp compiling issue for clang-4053586
i am trying to use this version clang-4053586 to compile the program has openmp. but i get the following errors error: loop not vectorized: failed explicitly specified loop vectorization [-Werror,-Wpass-failed=loop-vectorize] # pragma omp simd ^
the cflags for the clang is following. Is there anything wrong? -c -fno-exceptions -Wno-multichar -O2 -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -ffunction-sections -fno-short-enums -fstrict-aliasing -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -O2 -g -fno-strict-aliasing -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -m64 -march=x86-64 -DUSE_SSSE3 -mssse3 -msse4 -msse4.1 -msse4.2 -maes -mpopcnt -target x86_64-linux-android -Bprebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -std=gnu++14 -fno-rtti -std=c++11 -fvisibility-inlines-hidden -Wall -Werror -Wno-unknown-pragmas -fvisibility=internal -Wno-strict-overflow -fopenmp -fPIC -Wformat -Wformat-security -fstack-protector-all -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -fPIC -Wno-unused-variable -Wno-unused-parameter -Wno-non-virtual-dtor -Wno-missing-field-initializers -fexceptions -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -fPIC -D_USING_LIBCXX -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF
@pirama-arumuga-nainar , can you take a look at this when you have a chance? @kriszhangyf , is it possible to get your preprocessed source file? You can attach the .i file using -save-temps with the regular command.
@kriszhangyf Yes, please share a failing example. Failure to vectorize is very closely tied to the loop in question. I highly doubt Clang will fail to vectorize obvious loops.
-Rpass-missed=loop-vectorize, -Rpass-analysis=loop-vectorize (https://llvm.org/docs/Vectorizers.html#diagnostics) can help you further diagnose the loop vectorizer.
3+ months since asking for a test case with no response. Will reopen if we get one.
Hi guys,
Is clang with openmp supported in latest Android NDK r17? We are facing a crash issue using openmp in NDK r17 and couldn't find a clue:(
Any suggestion - flags, setups, etc, would be appreciated! :-)
Br, Murphy
Are you seeing this same crash? Can you provide a sample that reproduces the issue? If not, can you try NDK r18-beta1 as well to see if it still crashes?
@stephenhines
Hi Stephen,
The situation I'm facing is a very interesting one. It seems not all situation with omp will raise a crash issue, but only a very specific vendor and sub-thread use-case will trigger.
Many thanks for your warm and swift support!
Br, Murphy