[PATCH] D111034: [AArch64] Optimize add/sub with immediate
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 16 13:57:26 PDT 2021
vitalybuka added a comment.
there is some compiler crash after the patch https://lab.llvm.org/buildbot/#/builders/77/builds/10553/steps/10/logs/stdio
FAILED: lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/bin/clang++ -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/.. -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/../.. --target=aarch64-linux-android24 --sysroot=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -B/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -I//var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 -Wall -Werror -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG --target=aarch64-linux-android24 --sysroot=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -B/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -stdlib=libc++ -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googletest/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googletest -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googlemock/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googlemock -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common -fno-rtti -O2 -Werror=sign-compare -Wno-gnu-zero-variadic-macro-arguments -gline-tables-only -MD -MT lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o -MF lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o.d -o lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp
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: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/bin/clang++ -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/.. -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/../.. --target=aarch64-linux-android24 --sysroot=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -B/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -I//var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 -Wall -Werror -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG --target=aarch64-linux-android24 --sysroot=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -B/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/android_ndk/toolchains/llvm/prebuilt/linux-x86_64 -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -stdlib=libc++ -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googletest/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googletest -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googlemock/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/utils/unittest/googlemock -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common -fno-rtti -O2 -Werror=sign-compare -Wno-gnu-zero-variadic-macro-arguments -gline-tables-only -MD -MT lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o -MF lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o.d -o lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_ioctl_test.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp'.
4. Running pass 'AArch64 MI Peephole Optimization pass' on function '@_ZN25SanitizerIoctl_Fixup_Test8TestBodyEv'
#0 0x0000000005d2c9d3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
#1 0x0000000005d2a7de llvm::sys::RunSignalHandlers() /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/Signals.cpp:98:18
#2 0x0000000005d2bd4d llvm::sys::CleanupOnSignal(unsigned long) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
#3 0x0000000005c9dcd3 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:76:5
#4 0x0000000005c9de7e CrashRecoverySignalHandler(int) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:1
#5 0x00007ff4baee8980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#6 0x0000000003bf4b20 getOpcode /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:489:39
#7 0x0000000003bf4b20 (anonymous namespace)::AArch64MIPeepholeOpt::checkMovImmInstr(llvm::MachineInstr&, llvm::MachineInstr*&, llvm::MachineInstr*&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:289:14
#8 0x0000000003bf2e0b visitAND<unsigned int> /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:138:7
#9 0x0000000003bf2e0b (anonymous namespace)::AArch64MIPeepholeOpt::runOnMachineFunction(llvm::MachineFunction&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:330:19
#10 0x000000000501896d size /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/ADT/BitVector.h:151:35
#11 0x000000000501896d operator|= /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/ADT/BitVector.h:546:9
#12 0x000000000501896d set /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:186:16
#13 0x000000000501896d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:97:11
#14 0x00000000054a1388 llvm::FPPassManager::runOnFunction(llvm::Function&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1439:27
#15 0x00000000054a9861 llvm::FPPassManager::runOnModule(llvm::Module&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1485:13
#16 0x00000000054a1b34 runOnModule /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
#17 0x00000000054a1b34 llvm::legacy::PassManagerImpl::run(llvm::Module&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:542:44
#18 0x0000000006472274 RunCodegenPipeline /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1507:1
#19 0x0000000006472274 EmitAssembly /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1536:3
#20 0x0000000006472274 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1697:15
#21 0x00000000067bcb86 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unique_ptr.h:262:6
#22 0x00000000067bcb86 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:367:7
#23 0x00000000078c1354 __normal_iterator /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:783:20
#24 0x00000000078c1354 begin /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_vector.h:564:16
#25 0x00000000078c1354 finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> >, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> > > > > /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#26 0x00000000078c1354 clang::ParseAST(clang::Sema&, bool, bool) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Parse/ParseAST.cpp:178:3
#27 0x00000000066f0190 clang::FrontendAction::Execute() /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:961:10
#28 0x000000000666888f getPtr /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/Support/Error.h:273:42
#29 0x000000000666888f operator bool /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/Support/Error.h:236:16
#30 0x000000000666888f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1027:23
#31 0x00000000067b63d3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:261:25
#32 0x0000000003a84a2d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/driver/cc1_main.cpp:246:15
#33 0x0000000003a824cd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/driver/driver.cpp:317:12
#34 0x00000000064f94a2 operator() /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Driver/Job.cpp:405:30
#35 0x00000000064f94a2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1>(long) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:177:12
#36 0x0000000005c9dbe7 operator() /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:0:12
#37 0x0000000005c9dbe7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:425:3
#38 0x00000000064f8ff7 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Driver/Job.cpp:405:7
#39 0x00000000064c3a88 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Driver/Compilation.cpp:196:15
#40 0x00000000064c3d57 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Driver/Compilation.cpp:249:13
#41 0x00000000064dbf81 empty /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:73:47
#42 0x00000000064dbf81 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/lib/Driver/Driver.cpp:1553:23
#43 0x0000000003a819dd main /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/driver/driver.cpp:489:21
#44 0x00007ff4b9974bf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7)
#45 0x0000000003a7f1da _start (/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/bin/clang+++0x3a7f1da)
clang-14: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 14.0.0 (https://github.com/llvm/llvm-project.git 9bf6bef9951a1c230796ccad2c5c0195ce4c4dff)
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/bin
clang-14: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /tmp/sanitizer_ioctl_test-bd2cdc.cpp
clang-14: note: diagnostic msg: /tmp/sanitizer_ioctl_test-bd2cdc.sh
clang-14: note: diagnostic msg:
********************
[196/492] Building CXX object lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_flat_map_test.cpp.o
[197/492] Building CXX object lib/sanitizer_common/tests/CMakeFiles/SanitizerTest.dir/sanitizer_nolibc_test.cpp.o
[198/492] Building CXX object lib
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111034/new/
https://reviews.llvm.org/D111034
More information about the llvm-commits
mailing list