Version in base suite: 19.1.4-1~deb12u1 Base version: llvm-toolchain-19_19.1.4-1~deb12u1 Target version: llvm-toolchain-19_19.1.7-3~deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/l/llvm-toolchain-19/llvm-toolchain-19_19.1.4-1~deb12u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/l/llvm-toolchain-19/llvm-toolchain-19_19.1.7-3~deb12u1.dsc clang/docs/ReleaseNotes.rst | 3 clang/lib/Driver/Driver.cpp | 5 clang/lib/Driver/ToolChains/Hexagon.cpp | 9 clang/lib/Format/UnwrappedLineParser.cpp | 2 clang/lib/Interpreter/CMakeLists.txt | 2 clang/lib/Interpreter/IncrementalExecutor.h | 2 clang/lib/Interpreter/Interpreter.cpp | 2 clang/lib/Interpreter/Wasm.cpp | 65 clang/lib/Interpreter/Wasm.h | 1 clang/lib/Sema/SemaDeclCXX.cpp | 2 clang/test/Driver/hexagon-toolchain-linux.c | 10 clang/test/Driver/modules-print-library-module-manifest-path.cpp | 26 clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp | 39 clang/unittests/Format/FormatTest.cpp | 18 clang/unittests/Format/TokenAnnotatorTest.cpp | 19 clang/utils/perf-training/perf-helper.py | 2 cmake/Modules/LLVMVersion.cmake | 2 compiler-rt/lib/CMakeLists.txt | 2 compiler-rt/lib/lsan/lsan_interceptors.cpp | 2 compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp | 2 compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c | 60 debian/changelog | 87 debian/clang-X.Y-doc.lintian-overrides.in | 4 debian/clang-tools-X.Y.install.in | 2 debian/control | 4 debian/control.in | 4 debian/libclang-rt-X.Y-dev.install.in | 2 debian/libclang1-X.Y.symbols.in | 1 debian/libomp5-X.Y.symbols.in | 650 -- debian/patches/bolt-disable-proc-check.diff | 21 debian/patches/python3.13-quote.diff | 25 debian/patches/series | 2 debian/qualify-clang.sh | 3090 +++++----- debian/rules | 42 debian/source/lintian-overrides | 21 debian/tests/control | 4 debian/tests/control.in | 4 integration-test-suite/tests/test_asan_libc++.cpp | 14 libcxx/include/__config | 2 lld/ELF/Arch/Hexagon.cpp | 2 lld/test/ELF/emulation-loongarch.s | 2 lld/test/ELF/hexagon-jump-error.s | 2 lld/test/ELF/hexagon.s | 41 lld/test/ELF/loongarch-interlink.test | 4 lld/wasm/SyntheticSections.cpp | 3 llvm/cmake/modules/Findzstd.cmake | 5 llvm/include/llvm/Analysis/MemorySSAUpdater.h | 5 llvm/lib/Analysis/MemorySSAUpdater.cpp | 13 llvm/lib/Analysis/ScalarEvolution.cpp | 4 llvm/lib/CodeGen/MachineLICM.cpp | 2 llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 2 llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 8 llvm/lib/MC/WasmObjectWriter.cpp | 111 llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | 34 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 19 llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 4 llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp | 2 llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td | 6 llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp | 2 llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 4 llvm/lib/Target/Mips/MipsISelDAGToDAG.h | 3 llvm/lib/Target/Mips/MipsMSAInstrInfo.td | 59 llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp | 12 llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h | 3 llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | 4 llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 11 llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 7 llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | 17 llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td | 2 llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td | 5 llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp | 3 llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 4 llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | 2 llvm/lib/Transforms/Scalar/ConstraintElimination.cpp | 13 llvm/lib/Transforms/Scalar/LICM.cpp | 5 llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 5 llvm/lib/Transforms/Utils/Local.cpp | 10 llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 21 llvm/test/Analysis/ScalarEvolution/pr116483.ll | 26 llvm/test/CodeGen/AArch64/machine-licm-hoist-load.ll | 29 llvm/test/CodeGen/AArch64/sme-darwin-no-sve-vg.ll | 161 llvm/test/CodeGen/AArch64/sme-darwin-sve-vg.ll | 55 llvm/test/CodeGen/AArch64/sme-vg-to-stack.ll | 38 llvm/test/CodeGen/ARM/scalarize-assert-zext.ll | 46 llvm/test/CodeGen/Hexagon/simple-types-mem.ll | 22 llvm/test/CodeGen/LoongArch/code-models.ll | 10 llvm/test/CodeGen/LoongArch/e_flags.ll | 6 llvm/test/CodeGen/LoongArch/lsx/pr116008.ll | 17 llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll | 20 llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll | 40 llvm/test/CodeGen/LoongArch/tls-models.ll | 20 llvm/test/CodeGen/Mips/lcb5.ll | 4 llvm/test/CodeGen/RISCV/rvv/rv32-zve-bitcast-crash.ll | 22 llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_x_f_qf.ll | 4 llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_xu_f_qf.ll | 4 llvm/test/MC/WebAssembly/init-array-label.s | 91 llvm/test/MC/WebAssembly/init-array.s | 49 llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll | 20 llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll | 52 llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit.ll | 44 llvm/test/Transforms/IndVarSimplify/pr116483.ll | 36 llvm/test/Transforms/InstCombine/ptrmask.ll | 13 llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll | 16 llvm/test/Transforms/LICM/PR116813-memoryssa-outdated.ll | 50 llvm/test/Transforms/SLPVectorizer/abs-overflow-incorrect-minbws.ll | 33 llvm/test/Transforms/SLPVectorizer/slp-deleted-inst.ll | 51 llvm/test/Transforms/SimpleLoopUnswitch/pr117537.ll | 92 llvm/test/Transforms/SimplifyCFG/switch-branch-fold-indirectbr-102351.ll | 81 llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp | 8 llvm/utils/gn/secondary/llvm/version.gni | 2 llvm/utils/lit/lit/__init__.py | 2 llvm/utils/mlgo-utils/mlgo/__init__.py | 2 offload/CMakeLists.txt | 21 offload/cmake/OpenMPTesting.cmake | 2 offload/plugins-nextgen/common/CMakeLists.txt | 16 offload/test/CMakeLists.txt | 11 116 files changed, 3594 insertions(+), 2337 deletions(-) diff -Nru llvm-toolchain-19-19.1.4/clang/docs/ReleaseNotes.rst llvm-toolchain-19-19.1.7/clang/docs/ReleaseNotes.rst --- llvm-toolchain-19-19.1.4/clang/docs/ReleaseNotes.rst 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/docs/ReleaseNotes.rst 2025-01-14 16:29:54.000000000 +0000 @@ -1123,7 +1123,8 @@ - Fixed assertion failure by skipping the analysis of an invalid field declaration. (#GH99868) - Fix an issue with dependent source location expressions (#GH106428), (#GH81155), (#GH80210), (#GH85373) - Fix handling of ``_`` as the name of a lambda's init capture variable. (#GH107024) - +- Fixed recognition of ``std::initializer_list`` when it's surrounded with ``extern "C++"`` and exported + out of a module (which is the case e.g. in MSVC's implementation of ``std`` module). (#GH118218) Bug Fixes to AST Handling ^^^^^^^^^^^^^^^^^^^^^^^^^ diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Driver/Driver.cpp llvm-toolchain-19-19.1.7/clang/lib/Driver/Driver.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Driver/Driver.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Driver/Driver.cpp 2025-01-14 16:29:54.000000000 +0000 @@ -6189,6 +6189,11 @@ if (auto P = SearchPaths(TC.getFilePaths())) return *P; + SmallString<128> R2(ResourceDir); + llvm::sys::path::append(R2, "..", "..", Name); + if (llvm::sys::fs::exists(Twine(R2))) + return std::string(R2); + return std::string(Name); } diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Driver/ToolChains/Hexagon.cpp llvm-toolchain-19-19.1.7/clang/lib/Driver/ToolChains/Hexagon.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Driver/ToolChains/Hexagon.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Driver/ToolChains/Hexagon.cpp 2024-12-18 10:49:07.000000000 +0000 @@ -294,9 +294,10 @@ bool IncStartFiles = !Args.hasArg(options::OPT_nostartfiles); bool IncDefLibs = !Args.hasArg(options::OPT_nodefaultlibs); bool UseG0 = false; - const char *Exec = Args.MakeArgString(HTC.GetLinkerPath()); - bool UseLLD = (llvm::sys::path::filename(Exec).equals_insensitive("ld.lld") || - llvm::sys::path::stem(Exec).equals_insensitive("ld.lld")); + bool UseLLD = false; + const char *Exec = Args.MakeArgString(HTC.GetLinkerPath(&UseLLD)); + UseLLD = UseLLD || llvm::sys::path::filename(Exec).ends_with("ld.lld") || + llvm::sys::path::stem(Exec).ends_with("ld.lld"); bool UseShared = IsShared && !IsStatic; StringRef CpuVer = toolchains::HexagonToolChain::GetTargetCPUVersion(Args); @@ -378,9 +379,9 @@ if (NeedsXRayDeps) linkXRayRuntimeDeps(HTC, Args, CmdArgs); - CmdArgs.push_back("-lclang_rt.builtins-hexagon"); if (!Args.hasArg(options::OPT_nolibc)) CmdArgs.push_back("-lc"); + CmdArgs.push_back("-lclang_rt.builtins-hexagon"); } if (D.CCCIsCXX()) { if (HTC.ShouldLinkCXXStdlib(Args)) diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Format/UnwrappedLineParser.cpp llvm-toolchain-19-19.1.7/clang/lib/Format/UnwrappedLineParser.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Format/UnwrappedLineParser.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Format/UnwrappedLineParser.cpp 2025-01-14 16:29:54.000000000 +0000 @@ -512,7 +512,7 @@ break; do { NextTok = Tokens->getNextToken(); - } while (NextTok->NewlinesBefore == 0 && NextTok->isNot(tok::eof)); + } while (!NextTok->HasUnescapedNewline && NextTok->isNot(tok::eof)); while (NextTok->is(tok::comment)) NextTok = Tokens->getNextToken(); diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Interpreter/CMakeLists.txt llvm-toolchain-19-19.1.7/clang/lib/Interpreter/CMakeLists.txt --- llvm-toolchain-19-19.1.4/clang/lib/Interpreter/CMakeLists.txt 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Interpreter/CMakeLists.txt 2025-01-14 16:29:54.000000000 +0000 @@ -15,6 +15,7 @@ if (EMSCRIPTEN AND "lld" IN_LIST LLVM_ENABLE_PROJECTS) set(WASM_SRC Wasm.cpp) set(WASM_LINK lldWasm) + set(COMMON_LINK lldCommon) endif() add_clang_library(clangInterpreter @@ -45,6 +46,7 @@ clangSema clangSerialization ${WASM_LINK} + ${COMMON_LINK} ) if ((MINGW OR CYGWIN) AND BUILD_SHARED_LIBS) diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Interpreter/IncrementalExecutor.h llvm-toolchain-19-19.1.7/clang/lib/Interpreter/IncrementalExecutor.h --- llvm-toolchain-19-19.1.4/clang/lib/Interpreter/IncrementalExecutor.h 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Interpreter/IncrementalExecutor.h 2024-12-03 22:44:46.000000000 +0000 @@ -56,7 +56,7 @@ virtual llvm::Error addModule(PartialTranslationUnit &PTU); virtual llvm::Error removeModule(PartialTranslationUnit &PTU); virtual llvm::Error runCtors() const; - llvm::Error cleanUp(); + virtual llvm::Error cleanUp(); llvm::Expected getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const; diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Interpreter.cpp llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Interpreter.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Interpreter.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Interpreter.cpp 2025-01-14 16:29:54.000000000 +0000 @@ -192,8 +192,8 @@ #ifdef __EMSCRIPTEN__ Argv.push_back("-target"); Argv.push_back("wasm32-unknown-emscripten"); - Argv.push_back("-pie"); Argv.push_back("-shared"); + Argv.push_back("-fvisibility=default"); #endif Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Wasm.cpp llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Wasm.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Wasm.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Wasm.cpp 2024-12-04 12:12:01.000000000 +0000 @@ -23,6 +23,31 @@ #include namespace lld { +enum Flavor { + Invalid, + Gnu, // -flavor gnu + MinGW, // -flavor gnu MinGW + WinLink, // -flavor link + Darwin, // -flavor darwin + Wasm, // -flavor wasm +}; + +using Driver = bool (*)(llvm::ArrayRef, llvm::raw_ostream &, + llvm::raw_ostream &, bool, bool); + +struct DriverDef { + Flavor f; + Driver d; +}; + +struct Result { + int retCode; + bool canRunAgain; +}; + +Result lldMain(llvm::ArrayRef args, llvm::raw_ostream &stdoutOS, + llvm::raw_ostream &stderrOS, llvm::ArrayRef drivers); + namespace wasm { bool link(llvm::ArrayRef args, llvm::raw_ostream &stdoutOS, llvm::raw_ostream &stderrOS, bool exitEarly, bool disableOutput); @@ -51,13 +76,14 @@ llvm::TargetMachine *TargetMachine = Target->createTargetMachine( PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_); PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); - std::string OutputFileName = PTU.TheModule->getName().str() + ".wasm"; + std::string ObjectFileName = PTU.TheModule->getName().str() + ".o"; + std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm"; std::error_code Error; - llvm::raw_fd_ostream OutputFile(llvm::StringRef(OutputFileName), Error); + llvm::raw_fd_ostream ObjectFileOutput(llvm::StringRef(ObjectFileName), Error); llvm::legacy::PassManager PM; - if (TargetMachine->addPassesToEmitFile(PM, OutputFile, nullptr, + if (TargetMachine->addPassesToEmitFile(PM, ObjectFileOutput, nullptr, llvm::CodeGenFileType::ObjectFile)) { return llvm::make_error( "Wasm backend cannot produce object.", llvm::inconvertibleErrorCode()); @@ -69,27 +95,30 @@ llvm::inconvertibleErrorCode()); } - OutputFile.close(); + ObjectFileOutput.close(); std::vector LinkerArgs = {"wasm-ld", - "-pie", + "-shared", "--import-memory", - "--no-entry", - "--export-all", "--experimental-pic", - "--no-export-dynamic", "--stack-first", - OutputFileName.c_str(), + "--allow-undefined", + ObjectFileName.c_str(), "-o", - OutputFileName.c_str()}; - int Result = - lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); - if (!Result) + BinaryFileName.c_str()}; + + const lld::DriverDef WasmDriver = {lld::Flavor::Wasm, &lld::wasm::link}; + std::vector WasmDriverArgs; + WasmDriverArgs.push_back(WasmDriver); + lld::Result Result = + lld::lldMain(LinkerArgs, llvm::outs(), llvm::errs(), WasmDriverArgs); + + if (Result.retCode) return llvm::make_error( "Failed to link incremental module", llvm::inconvertibleErrorCode()); void *LoadedLibModule = - dlopen(OutputFileName.c_str(), RTLD_NOW | RTLD_GLOBAL); + dlopen(BinaryFileName.c_str(), RTLD_NOW | RTLD_GLOBAL); if (LoadedLibModule == nullptr) { llvm::errs() << dlerror() << '\n'; return llvm::make_error( @@ -109,6 +138,12 @@ return llvm::Error::success(); } +llvm::Error WasmIncrementalExecutor::cleanUp() { + // Can't call cleanUp through IncrementalExecutor as it + // tries to deinitialize JIT which hasn't been initialized + return llvm::Error::success(); +} + WasmIncrementalExecutor::~WasmIncrementalExecutor() = default; -} // namespace clang +} // namespace clang \ No newline at end of file diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Wasm.h llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Wasm.h --- llvm-toolchain-19-19.1.4/clang/lib/Interpreter/Wasm.h 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Interpreter/Wasm.h 2024-12-03 22:44:46.000000000 +0000 @@ -28,6 +28,7 @@ llvm::Error addModule(PartialTranslationUnit &PTU) override; llvm::Error removeModule(PartialTranslationUnit &PTU) override; llvm::Error runCtors() const override; + llvm::Error cleanUp() override; ~WasmIncrementalExecutor() override; }; diff -Nru llvm-toolchain-19-19.1.4/clang/lib/Sema/SemaDeclCXX.cpp llvm-toolchain-19-19.1.7/clang/lib/Sema/SemaDeclCXX.cpp --- llvm-toolchain-19-19.1.4/clang/lib/Sema/SemaDeclCXX.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/lib/Sema/SemaDeclCXX.cpp 2025-01-14 16:29:54.000000000 +0000 @@ -11919,7 +11919,7 @@ if (TemplateClass->getIdentifier() != &PP.getIdentifierTable().get("initializer_list") || !getStdNamespace()->InEnclosingNamespaceSetOf( - TemplateClass->getDeclContext())) + TemplateClass->getNonTransparentDeclContext())) return false; // This is a template called std::initializer_list, but is it the right // template? diff -Nru llvm-toolchain-19-19.1.4/clang/test/Driver/hexagon-toolchain-linux.c llvm-toolchain-19-19.1.7/clang/test/Driver/hexagon-toolchain-linux.c --- llvm-toolchain-19-19.1.4/clang/test/Driver/hexagon-toolchain-linux.c 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/test/Driver/hexagon-toolchain-linux.c 2024-12-18 10:49:07.000000000 +0000 @@ -11,7 +11,7 @@ // CHECK000-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crti.o // CHECK000: "-dynamic-linker={{/|\\\\}}lib{{/|\\\\}}ld-musl-hexagon.so.1" // CHECK000: "{{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o" -// CHECK000: "-lclang_rt.builtins-hexagon" "-lc" +// CHECK000: "-lc" "-lclang_rt.builtins-hexagon" // ----------------------------------------------------------------------------- // Passing --musl --shared // ----------------------------------------------------------------------------- @@ -21,7 +21,7 @@ // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree -shared %s 2>&1 | FileCheck -check-prefix=CHECK001 %s // CHECK001-NOT: -dynamic-linker={{/|\\\\}}lib{{/|\\\\}}ld-musl-hexagon.so.1 // CHECK001: "{{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crti.o" -// CHECK001: "-lclang_rt.builtins-hexagon" "-lc" +// CHECK001: "-lc" "-lclang_rt.builtins-hexagon" // CHECK001-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o // ----------------------------------------------------------------------------- // Passing --musl -nostdlib @@ -33,8 +33,8 @@ // CHECK002: "-dynamic-linker={{/|\\\\}}lib{{/|\\\\}}ld-musl-hexagon.so.1" // CHECK002-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crti.o // CHECK002-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o -// CHECK002-NOT: "-lclang_rt.builtins-hexagon" // CHECK002-NOT: "-lc" +// CHECK002-NOT: "-lclang_rt.builtins-hexagon" // ----------------------------------------------------------------------------- // Passing --musl -nostartfiles // ----------------------------------------------------------------------------- @@ -45,7 +45,7 @@ // CHECK003: "-dynamic-linker={{/|\\\\}}lib{{/|\\\\}}ld-musl-hexagon.so.1" // CHECK003-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}Scrt1.o // CHECK003-NOT: {{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o -// CHECK003: "-lclang_rt.builtins-hexagon" "-lc" +// CHECK003: "-lc" "-lclang_rt.builtins-hexagon" // ----------------------------------------------------------------------------- // Passing --musl -nodefaultlibs // ----------------------------------------------------------------------------- @@ -55,8 +55,8 @@ // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree -nodefaultlibs %s 2>&1 | FileCheck -check-prefix=CHECK004 %s // CHECK004: "-dynamic-linker={{/|\\\\}}lib{{/|\\\\}}ld-musl-hexagon.so.1" // CHECK004: "{{.*}}basic_linux_libcxx_tree{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o" -// CHECK004-NOT: "-lclang_rt.builtins-hexagon" // CHECK004-NOT: "-lc" +// CHECK004-NOT: "-lclang_rt.builtins-hexagon" // ----------------------------------------------------------------------------- // Passing --musl -nolibc // ----------------------------------------------------------------------------- diff -Nru llvm-toolchain-19-19.1.4/clang/test/Driver/modules-print-library-module-manifest-path.cpp llvm-toolchain-19-19.1.7/clang/test/Driver/modules-print-library-module-manifest-path.cpp --- llvm-toolchain-19-19.1.4/clang/test/Driver/modules-print-library-module-manifest-path.cpp 2024-11-26 09:13:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/test/Driver/modules-print-library-module-manifest-path.cpp 2025-01-14 16:29:49.000000000 +0000 @@ -18,6 +18,28 @@ // RUN: --target=x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck libcxx.cpp +// for macos there is a different directory structure +// where the library and libc++.modules.json file are in lib +// directly but headers are in clang/ver directory which +// is the resource directory +// RUN: mkdir -p %t/Inputs/usr/lib/clang/20 +// RUN: touch %t/Inputs/usr/lib/libc++.so +// RUN: touch %t/Inputs/usr/lib/libc++.modules.json +// RUN: %clang -print-library-module-manifest-path \ +// RUN: -stdlib=libc++ \ +// RUN: -resource-dir=%t/Inputs/usr/lib/clang/20 \ +// RUN: --target=arm64-apple-darwin24.1.0 2>&1 \ +// RUN: | FileCheck libcxx.cpp.macos + +// RUN: rm %t/Inputs/usr/lib/libc++.so +// RUN: touch %t/Inputs/usr/lib/libc++.a +// RUN: touch %t/Inputs/usr/lib/libc++.modules.json +// RUN: %clang -print-library-module-manifest-path \ +// RUN: -stdlib=libc++ \ +// RUN: -resource-dir=%t/Inputs/usr/lib/clang/20 \ +// RUN: --target=arm64-apple-darwin24.1.0 2>&1 \ +// RUN: | FileCheck libcxx.cpp.macos + // RUN: rm %t/Inputs/usr/lib/x86_64-linux-gnu/libc++.so // RUN: touch %t/Inputs/usr/lib/x86_64-linux-gnu/libc++.a // RUN: %clang -print-library-module-manifest-path \ @@ -40,6 +62,10 @@ // CHECK: {{.*}}/Inputs/usr/lib/x86_64-linux-gnu{{/|\\}}libc++.modules.json +//--- libcxx.cpp.macos + +// CHECK: {{.*}}libc++.modules.json + //--- libcxx-no-shared-lib.cpp // Note this might find a different path depending whether search path diff -Nru llvm-toolchain-19-19.1.4/clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp llvm-toolchain-19-19.1.7/clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp --- llvm-toolchain-19-19.1.4/clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp 2024-12-18 10:49:07.000000000 +0000 @@ -0,0 +1,39 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/std.cppm -emit-module-interface -o %t/std.pcm +// RUN: %clang_cc1 -std=c++20 %t/mod.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/mod.pcm +// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -verify %t/main.cpp + +//--- std.cppm +export module std; + +extern "C++" { + namespace std { + export template + class initializer_list { + const E* _1; + const E* _2; + }; + } +} + +//--- mod.cppm +export module mod; + +import std; + +export struct A { + void func(std::initializer_list) {} +}; + +//--- main.cpp +// expected-no-diagnostics +import std; +import mod; + +int main() { + A{}.func({1,1}); + return 0; +} diff -Nru llvm-toolchain-19-19.1.4/clang/unittests/Format/FormatTest.cpp llvm-toolchain-19-19.1.7/clang/unittests/Format/FormatTest.cpp --- llvm-toolchain-19-19.1.4/clang/unittests/Format/FormatTest.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/unittests/Format/FormatTest.cpp 2025-01-14 16:29:55.000000000 +0000 @@ -5724,6 +5724,24 @@ getLLVMStyleWithColumns(22)); verifyFormat("#define A void # ## #", getLLVMStyleWithColumns(22)); + +#if 0 + // FIXME: The correct format is: + verifyFormat("{\n" + " {\n" + "#define GEN_ID(_x) char *_x{#_x}\n" + " GEN_ID(one);\n" + " }\n" + "}"); +#endif + verifyFormat("{\n" + " {\n" + "#define GEN_ID(_x) \\\n" + " char *_x { #_x }\n" + " GEN_ID(one);\n" + " }\n" + "}", + getGoogleStyle()); } TEST_F(FormatTest, RespectWhitespaceInMacroDefinitions) { diff -Nru llvm-toolchain-19-19.1.4/clang/unittests/Format/TokenAnnotatorTest.cpp llvm-toolchain-19-19.1.7/clang/unittests/Format/TokenAnnotatorTest.cpp --- llvm-toolchain-19-19.1.4/clang/unittests/Format/TokenAnnotatorTest.cpp 2024-11-26 09:13:19.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/unittests/Format/TokenAnnotatorTest.cpp 2025-01-14 16:29:55.000000000 +0000 @@ -3203,6 +3203,25 @@ EXPECT_BRACE_KIND(Tokens[11], BK_BracedInit); EXPECT_BRACE_KIND(Tokens[13], BK_Block); + Tokens = annotate("{\n" + " {\n" + "#define GEN_ID(_x) char *_x{#_x}\n" + " GEN_ID(one);\n" + " }\n" + "}"); + ASSERT_EQ(Tokens.size(), 23u) << Tokens; + EXPECT_TOKEN(Tokens[0], tok::l_brace, TT_BlockLBrace); + EXPECT_BRACE_KIND(Tokens[0], BK_Block); + EXPECT_TOKEN(Tokens[1], tok::l_brace, TT_BlockLBrace); + EXPECT_BRACE_KIND(Tokens[1], BK_Block); +#if 0 + // FIXME: + EXPECT_BRACE_KIND(Tokens[11], BK_BracedInit); + EXPECT_BRACE_KIND(Tokens[14], BK_BracedInit); +#endif + EXPECT_BRACE_KIND(Tokens[20], BK_Block); + EXPECT_BRACE_KIND(Tokens[21], BK_Block); + Tokens = annotate("a = class extends goog.a {};", getGoogleStyle(FormatStyle::LK_JavaScript)); ASSERT_EQ(Tokens.size(), 11u) << Tokens; diff -Nru llvm-toolchain-19-19.1.4/clang/utils/perf-training/perf-helper.py llvm-toolchain-19-19.1.7/clang/utils/perf-training/perf-helper.py --- llvm-toolchain-19-19.1.4/clang/utils/perf-training/perf-helper.py 2024-11-26 09:13:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/clang/utils/perf-training/perf-helper.py 2024-12-10 08:36:31.000000000 +0000 @@ -36,7 +36,7 @@ + "\tRemoves all files with extension from ." ) return 1 - for path in args[1:-1]: + for path in args[0:-1]: for filename in findFilesWithExtension(path, args[-1]): os.remove(filename) return 0 diff -Nru llvm-toolchain-19-19.1.4/cmake/Modules/LLVMVersion.cmake llvm-toolchain-19-19.1.7/cmake/Modules/LLVMVersion.cmake --- llvm-toolchain-19-19.1.4/cmake/Modules/LLVMVersion.cmake 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/cmake/Modules/LLVMVersion.cmake 2025-01-14 16:29:55.000000000 +0000 @@ -7,7 +7,7 @@ set(LLVM_VERSION_MINOR 1) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 4) + set(LLVM_VERSION_PATCH 7) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX) diff -Nru llvm-toolchain-19-19.1.4/compiler-rt/lib/CMakeLists.txt llvm-toolchain-19-19.1.7/compiler-rt/lib/CMakeLists.txt --- llvm-toolchain-19-19.1.4/compiler-rt/lib/CMakeLists.txt 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/compiler-rt/lib/CMakeLists.txt 2024-12-18 10:49:08.000000000 +0000 @@ -9,7 +9,7 @@ # #TODO: Refactor sanitizer_common into smaller pieces (e.g. flag parsing, utils). if (COMPILER_RT_HAS_SANITIZER_COMMON AND - (COMPILER_RT_BUILD_SANITIZERS OR COMPILER_RT_BUILD_XRAY OR COMPILER_RT_BUILD_MEMPROF)) + (COMPILER_RT_BUILD_SANITIZERS OR COMPILER_RT_BUILD_XRAY OR COMPILER_RT_BUILD_MEMPROF OR COMPILER_RT_BUILD_CTX_PROFILE)) add_subdirectory(sanitizer_common) endif() diff -Nru llvm-toolchain-19-19.1.4/compiler-rt/lib/lsan/lsan_interceptors.cpp llvm-toolchain-19-19.1.7/compiler-rt/lib/lsan/lsan_interceptors.cpp --- llvm-toolchain-19-19.1.4/compiler-rt/lib/lsan/lsan_interceptors.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/compiler-rt/lib/lsan/lsan_interceptors.cpp 2025-01-14 16:29:55.000000000 +0000 @@ -77,6 +77,8 @@ } INTERCEPTOR(void, free, void *p) { + if (UNLIKELY(!p)) + return; if (DlsymAlloc::PointerIsMine(p)) return DlsymAlloc::Free(p); ENSURE_LSAN_INITED; diff -Nru llvm-toolchain-19-19.1.4/compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp llvm-toolchain-19-19.1.7/compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp --- llvm-toolchain-19-19.1.4/compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cpp 2024-12-03 22:44:47.000000000 +0000 @@ -9,7 +9,7 @@ // static build, there won't be any clang_rt DLLs. // RUN: not grep cl""ang_rt %t || \ // RUN: grep cl""ang_rt %t | xargs which | \ -// RUN: xargs llvm-readobj --coff-imports | not grep dbghelp.dll %t +// RUN: xargs llvm-readobj --coff-imports | not grep dbghelp.dll extern "C" int puts(const char *); diff -Nru llvm-toolchain-19-19.1.4/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c llvm-toolchain-19-19.1.7/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c --- llvm-toolchain-19-19.1.4/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c 2025-01-14 16:29:55.000000000 +0000 @@ -0,0 +1,60 @@ +// RUN: %clang -O0 %s -o %t && %run %t + +// FIXME: TSAN does not use DlsymAlloc. +// UNSUPPORTED: tsan +// FIXME: investigate why this fails on macos +// UNSUPPORTED: darwin + +#include + +const char *test() __attribute__((disable_sanitizer_instrumentation)) { + void *volatile p = malloc(3); + p = realloc(p, 7); + free(p); + + p = calloc(3, 7); + free(p); + + free(NULL); + + return ""; +} + +const char *__asan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__hwasan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__lsan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__memprof_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__msan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__nsan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__rtsan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__tsan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} +const char *__ubsan_default_options() + __attribute__((disable_sanitizer_instrumentation)) { + return test(); +} + +int main(int argc, char **argv) { return 0; } diff -Nru llvm-toolchain-19-19.1.4/debian/changelog llvm-toolchain-19-19.1.7/debian/changelog --- llvm-toolchain-19-19.1.4/debian/changelog 2024-11-27 23:40:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/changelog 2025-06-24 19:05:25.000000000 +0000 @@ -1,14 +1,81 @@ -llvm-toolchain-19 (1:19.1.4-1~deb12u1) bookworm; urgency=medium +llvm-toolchain-19 (1:19.1.7-3~deb12u1) bookworm; urgency=medium * Non-maintainer upload. * Rebuild for bookworm. * Change build-dep from sid's llvm-spirv-19 to bookworm's llvm-spirv-14. * Add python3-myst-parser build-dep. - * Use CMAKE_BUILD_PARALLEL_LEVEL rather than -j to ensure that we don't - OOM during builds - (https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/157). - -- Andres Salomon Wed, 27 Nov 2024 23:40:11 +0000 + -- Andres Salomon Tue, 24 Jun 2025 19:05:25 +0000 + +llvm-toolchain-19 (1:19.1.7-3) unstable; urgency=medium + + * conditionalize the binutils-gold build-dep + + -- Sylvestre Ledru Fri, 14 Mar 2025 10:48:31 +0100 + +llvm-toolchain-19 (1:19.1.7-2) unstable; urgency=medium + + [ Sylvestre Ledru ] + * Skip some autopkgtests on non intel cpu. Closes: #1094233. + * clang-19 recommends clang-tools-19 + https://github.com/llvm/llvm-project/issues/117333 + * Also add binutils-gold in the integration-test-suite-test testsuite + * Add binutils-gold as build dep + * Install hwasan_symbolize on x32 (Closes: #1100161) + Thanks to Jing Luo for the patch + + [ Matthias Klose ] + * d/t/control.in: Add binutils-gold as explicit test dependency. + Don't add binutils-gold as a build dependency, just build with the + default linker. + * Do changes from last upload in d/t/control.in, not in d/t/control. + * d/rules: Simplify permission settings for generated debhelper files. + + -- Sylvestre Ledru Tue, 25 Feb 2025 18:05:48 +0100 + +llvm-toolchain-19 (1:19.1.7-1) unstable; urgency=medium + + [ Matthias Klose ] + * Update libclang1 symbols file. + + [ Sylvestre Ledru ] + * New upstream release + * Rewrite qualify-clang.sh with bats + Might fail on some archs + * Tests: integration-test-suite-test + Remove explicit dep libstdc++-14 + + -- Sylvestre Ledru Tue, 14 Jan 2025 14:16:47 +0100 + +llvm-toolchain-19 (1:19.1.6-1) unstable; urgency=medium + + [ Sylvestre Ledru ] + * New upstream release. Should be the last of 19 + And the one in the next Debian release + * Remove the capability to be able to disable C++ Exceptions in libc++ + * Bring back C++ exceptions on s390x for libc++ (LP: #2086782) + * Disable -Bsymbolic-function on Ubuntu for causing: + https://github.com/llvm/llvm-project/issues/59432#issuecomment-2500694332 + + [ Matthias Klose ] + * bolt: Disable the check for /proc/self/map_files. Might not be available + on build machines. LP: #2084316. + * Fix compatibility with Python 3.13. Closes: #1084638. + + -- Sylvestre Ledru Wed, 18 Dec 2024 10:01:43 +0100 + +llvm-toolchain-19 (1:19.1.5-1) unstable; urgency=medium + + [ Matthias Klose ] + * Better correct than less cryptic. Fix BD_ALT_HELLO substitutions. + + [ John Paul Adrian Glaubitz ] + * Install liborc_rt-powerpc64.a on powerpc + + [ Sylvestre Ledru ] + * New upstream release + + -- Sylvestre Ledru Wed, 04 Dec 2024 13:11:08 +0100 llvm-toolchain-19 (1:19.1.4-1) unstable; urgency=medium @@ -336,6 +403,16 @@ -- Sylvestre Ledru Thu, 25 Jan 2024 14:51:10 +0100 +llvm-toolchain-18 (1:18.1.8-15) unstable; urgency=medium + + [ Matthias Klose ] + * d/t/control: Remove explicit dependency on libstdc++-N-dev. + + [ Sylvestre Ledru ] + * Skip some autopkgtests on non intel cpu + + -- Sylvestre Ledru Thu, 16 Jan 2025 14:16:06 +0100 + llvm-toolchain-18 (1:18.1.0~rc4-1) unstable; urgency=medium [ John Paul Adrian Glaubitz ] diff -Nru llvm-toolchain-19-19.1.4/debian/clang-X.Y-doc.lintian-overrides.in llvm-toolchain-19-19.1.7/debian/clang-X.Y-doc.lintian-overrides.in --- llvm-toolchain-19-19.1.4/debian/clang-X.Y-doc.lintian-overrides.in 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/clang-X.Y-doc.lintian-overrides.in 2024-12-17 10:50:27.000000000 +0000 @@ -0,0 +1,4 @@ +clang-@LLVM_VERSION@-doc: embedded-javascript-library please use sphinx [usr/share/doc/clang-*/html/_static/searchtools.js] +clang-@LLVM_VERSION@-doc: embedded-javascript-library please use sphinx [usr/share/doc/clang-*/html/_static/language_data.js] +clang-@LLVM_VERSION@-doc: embedded-javascript-library please use sphinx [usr/share/doc/clang-*/html/_static/doctools.js] +clang-@LLVM_VERSION@-doc: privacy-breach-generic: *youtube* diff -Nru llvm-toolchain-19-19.1.4/debian/clang-tools-X.Y.install.in llvm-toolchain-19-19.1.7/debian/clang-tools-X.Y.install.in --- llvm-toolchain-19-19.1.4/debian/clang-tools-X.Y.install.in 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/clang-tools-X.Y.install.in 2025-03-13 18:05:48.000000000 +0000 @@ -64,7 +64,7 @@ usr/lib/llvm-@LLVM_VERSION@/libexec/intercept-cc # See compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake / HWASAN_SUPPORTED_ARCH -[amd64 arm64 riscv64 i386] usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@/bin/hwasan_symbolize +[amd64 arm64 riscv64 i386 x32] usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@/bin/hwasan_symbolize clang/tools/scan-build-@LLVM_VERSION@ usr/share/clang/ clang/tools/scan-view-@LLVM_VERSION@ usr/share/clang/ diff -Nru llvm-toolchain-19-19.1.4/debian/control llvm-toolchain-19-19.1.7/debian/control --- llvm-toolchain-19-19.1.4/debian/control 2024-11-27 23:40:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/control 2025-06-24 19:05:25.000000000 +0000 @@ -10,7 +10,7 @@ libffi-dev, lsb-release, patchutils, diffstat, xz-utils, python3-dev, libedit-dev, libncurses-dev, swig, python3-sphinx (>= 1.3.6), - binutils-dev, + binutils-dev, binutils-gold [amd64 arm64 armel armhf i386 powerpc ppc64 ppc64el sparc sparc64 s390x x32 hurd-amd64 hurd-i386], libxml2-dev, libjsoncpp-dev, pkg-config, libipt-dev [amd64 i386], @@ -53,7 +53,7 @@ llvm-19-linker-tools (= ${binary:Version}), libclang1-19 (= ${binary:Version}), libc6-dev, binutils Provides: c-compiler, objc-compiler, c++-compiler, objc++-compiler -Recommends: llvm-19-dev, python3 +Recommends: llvm-19-dev, python3, clang-tools-19 # libomp-19-dev Suggests: clang-19-doc, wasi-libc Description: C, C++ and Objective-C compiler diff -Nru llvm-toolchain-19-19.1.4/debian/control.in llvm-toolchain-19-19.1.7/debian/control.in --- llvm-toolchain-19-19.1.4/debian/control.in 2024-11-27 23:40:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/control.in 2025-06-24 19:05:25.000000000 +0000 @@ -10,7 +10,7 @@ libffi-dev, lsb-release, patchutils, diffstat, xz-utils, python3-dev, libedit-dev, libncurses-dev, swig, python3-sphinx (>= 1.3.6), - binutils-dev, + binutils-dev, binutils-gold [amd64 arm64 armel armhf i386 powerpc ppc64 ppc64el sparc sparc64 s390x x32 hurd-amd64 hurd-i386], libxml2-dev, libjsoncpp-dev, pkg-config, libipt-dev [amd64 i386], @@ -53,7 +53,7 @@ llvm-@LLVM_VERSION@-linker-tools (= ${binary:Version}), libclang1-@LLVM_VERSION@ (= ${binary:Version}), libc6-dev, binutils Provides: c-compiler, objc-compiler, c++-compiler, objc++-compiler -Recommends: llvm-@LLVM_VERSION@-dev, python3 +Recommends: llvm-@LLVM_VERSION@-dev, python3, clang-tools-@LLVM_VERSION@ # libomp-@LLVM_VERSION@-dev Suggests: clang-@LLVM_VERSION@-doc, wasi-libc Description: C, C++ and Objective-C compiler diff -Nru llvm-toolchain-19-19.1.4/debian/libclang-rt-X.Y-dev.install.in llvm-toolchain-19-19.1.7/debian/libclang-rt-X.Y-dev.install.in --- llvm-toolchain-19-19.1.4/debian/libclang-rt-X.Y-dev.install.in 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/libclang-rt-X.Y-dev.install.in 2025-02-25 18:37:49.000000000 +0000 @@ -7,4 +7,4 @@ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/include/fuzzer/ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/include/orc/c_api.h # See compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake / ALL_ORC_SUPPORTED_ARCH -[amd64 arm64 armhf armel i386 ppc64 ppc64el x32] usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/lib/linux/liborc_rt* +[amd64 arm64 armhf armel i386 powerpc ppc64 ppc64el x32] usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/lib/linux/liborc_rt* diff -Nru llvm-toolchain-19-19.1.4/debian/libclang1-X.Y.symbols.in llvm-toolchain-19-19.1.7/debian/libclang1-X.Y.symbols.in --- llvm-toolchain-19-19.1.4/debian/libclang1-X.Y.symbols.in 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/libclang1-X.Y.symbols.in 2025-01-16 12:55:58.000000000 +0000 @@ -2,6 +2,7 @@ (optional)LLVM_13@LLVM_13 1:15.0.7-3 (optional)LLVM_16@LLVM_16 1:16.0.2-1 (optional)LLVM_17@LLVM_17 1:17.0.1-1 + (symver)LLVM_19 1:19.1.6 clang_BlockCommandComment_getArgText@LLVM_13 1:5.0~svn298832-1~ clang_BlockCommandComment_getCommandName@LLVM_13 1:5.0~svn298832-1~ clang_BlockCommandComment_getNumArgs@LLVM_13 1:5.0~svn298832-1~ diff -Nru llvm-toolchain-19-19.1.4/debian/libomp5-X.Y.symbols.in llvm-toolchain-19-19.1.7/debian/libomp5-X.Y.symbols.in --- llvm-toolchain-19-19.1.4/debian/libomp5-X.Y.symbols.in 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/libomp5-X.Y.symbols.in 2025-01-16 12:55:58.000000000 +0000 @@ -1,275 +1,148 @@ -libomp.so.5 libomp5-@LLVM_VERSION@ #MINVER# - GOMP_1.0@GOMP_1.0 0.20131209 - GOMP_2.0@GOMP_2.0 0.20131209 - GOMP_3.0@GOMP_3.0 0.20131209 - GOMP_4.0@GOMP_4.0 0.20131209 - GOMP_4.5@GOMP_4.5 7 - GOMP_5.0.1@GOMP_5.0.1 14 - GOMP_5.0@GOMP_5.0 11 - GOMP_alloc@GOMP_5.0.1 14 +libomp.so.5 #PACKAGE# #MINVER# + (symver)GOMP_1.0 0.20131209 + (symver)GOMP_2.0 0.20131209 + (symver)GOMP_3.0 0.20131209 + (symver)GOMP_4.0 0.20131209 + (symver)GOMP_4.5 7 + (symver)GOMP_5.0 11 + (symver)GOMP_5.0.1 1:14 + (symver)OMP_1.0 0.20131209 + (symver)OMP_2.0 0.20131209 + (symver)OMP_3.0 0.20131209 + (symver)OMP_3.1 0.20131209 + (symver)OMP_4.0 0.20131209 + (symver)OMP_4.5 7 + (symver)OMP_5.0 13 +# do not make the VERSION symbol a symver! + VERSION@VERSION 0.20130412 GOMP_alloc@VERSION 14 - GOMP_atomic_end@GOMP_1.0 0.20131209 GOMP_atomic_end@VERSION 0.20130412 - GOMP_atomic_start@GOMP_1.0 0.20131209 GOMP_atomic_start@VERSION 0.20130412 - GOMP_barrier@GOMP_1.0 0.20131209 GOMP_barrier@VERSION 0.20130412 - GOMP_barrier_cancel@GOMP_4.0 0.20140926 GOMP_barrier_cancel@VERSION 0.20140926 - GOMP_cancel@GOMP_4.0 0.20140926 GOMP_cancel@VERSION 0.20140926 - GOMP_cancellation_point@GOMP_4.0 0.20140926 GOMP_cancellation_point@VERSION 0.20140926 - GOMP_critical_end@GOMP_1.0 0.20131209 GOMP_critical_end@VERSION 0.20130412 - GOMP_critical_name_end@GOMP_1.0 0.20131209 GOMP_critical_name_end@VERSION 0.20130412 - GOMP_critical_name_start@GOMP_1.0 0.20131209 GOMP_critical_name_start@VERSION 0.20130412 - GOMP_critical_start@GOMP_1.0 0.20131209 GOMP_critical_start@VERSION 0.20130412 - GOMP_doacross_post@GOMP_4.5 7 GOMP_doacross_post@VERSION 7 - GOMP_doacross_ull_post@GOMP_4.5 7 GOMP_doacross_ull_post@VERSION 7 - GOMP_doacross_ull_wait@GOMP_4.5 7 GOMP_doacross_ull_wait@VERSION 7 - GOMP_doacross_wait@GOMP_4.5 7 GOMP_doacross_wait@VERSION 7 - GOMP_free@GOMP_5.0.1 14 GOMP_free@VERSION 14 - GOMP_loop_doacross_dynamic_start@GOMP_4.5 7 GOMP_loop_doacross_dynamic_start@VERSION 7 - GOMP_loop_doacross_guided_start@GOMP_4.5 7 GOMP_loop_doacross_guided_start@VERSION 7 - GOMP_loop_doacross_runtime_start@GOMP_4.5 7 GOMP_loop_doacross_runtime_start@VERSION 7 - GOMP_loop_doacross_start@GOMP_5.0 13 GOMP_loop_doacross_start@VERSION 13 - GOMP_loop_doacross_static_start@GOMP_4.5 7 GOMP_loop_doacross_static_start@VERSION 7 - GOMP_loop_dynamic_next@GOMP_1.0 0.20131209 GOMP_loop_dynamic_next@VERSION 0.20130412 - GOMP_loop_dynamic_start@GOMP_1.0 0.20131209 GOMP_loop_dynamic_start@VERSION 0.20130412 - GOMP_loop_end@GOMP_1.0 0.20131209 GOMP_loop_end@VERSION 0.20130412 - GOMP_loop_end_cancel@GOMP_4.0 0.20140926 GOMP_loop_end_cancel@VERSION 0.20140926 - GOMP_loop_end_nowait@GOMP_1.0 0.20131209 GOMP_loop_end_nowait@VERSION 0.20130412 - GOMP_loop_guided_next@GOMP_1.0 0.20131209 GOMP_loop_guided_next@VERSION 0.20130412 - GOMP_loop_guided_start@GOMP_1.0 0.20131209 GOMP_loop_guided_start@VERSION 0.20130412 - GOMP_loop_maybe_nonmonotonic_runtime_next@GOMP_5.0 11 GOMP_loop_maybe_nonmonotonic_runtime_next@VERSION 11 - GOMP_loop_maybe_nonmonotonic_runtime_start@GOMP_5.0 11 GOMP_loop_maybe_nonmonotonic_runtime_start@VERSION 11 - GOMP_loop_nonmonotonic_dynamic_next@GOMP_4.5 10 GOMP_loop_nonmonotonic_dynamic_next@VERSION 10 - GOMP_loop_nonmonotonic_dynamic_start@GOMP_4.5 10 GOMP_loop_nonmonotonic_dynamic_start@VERSION 10 - GOMP_loop_nonmonotonic_guided_next@GOMP_4.5 10 GOMP_loop_nonmonotonic_guided_next@VERSION 10 - GOMP_loop_nonmonotonic_guided_start@GOMP_4.5 10 GOMP_loop_nonmonotonic_guided_start@VERSION 10 - GOMP_loop_nonmonotonic_runtime_next@GOMP_5.0 11 GOMP_loop_nonmonotonic_runtime_next@VERSION 11 - GOMP_loop_nonmonotonic_runtime_start@GOMP_5.0 11 GOMP_loop_nonmonotonic_runtime_start@VERSION 11 - GOMP_loop_ordered_dynamic_next@GOMP_1.0 0.20131209 GOMP_loop_ordered_dynamic_next@VERSION 0.20130412 - GOMP_loop_ordered_dynamic_start@GOMP_1.0 0.20131209 GOMP_loop_ordered_dynamic_start@VERSION 0.20130412 - GOMP_loop_ordered_guided_next@GOMP_1.0 0.20131209 GOMP_loop_ordered_guided_next@VERSION 0.20130412 - GOMP_loop_ordered_guided_start@GOMP_1.0 0.20131209 GOMP_loop_ordered_guided_start@VERSION 0.20130412 - GOMP_loop_ordered_runtime_next@GOMP_1.0 0.20131209 GOMP_loop_ordered_runtime_next@VERSION 0.20130412 - GOMP_loop_ordered_runtime_start@GOMP_1.0 0.20131209 GOMP_loop_ordered_runtime_start@VERSION 0.20130412 - GOMP_loop_ordered_start@GOMP_5.0 13 GOMP_loop_ordered_start@VERSION 13 - GOMP_loop_ordered_static_next@GOMP_1.0 0.20131209 GOMP_loop_ordered_static_next@VERSION 0.20130412 - GOMP_loop_ordered_static_start@GOMP_1.0 0.20131209 GOMP_loop_ordered_static_start@VERSION 0.20130412 - GOMP_loop_runtime_next@GOMP_1.0 0.20131209 GOMP_loop_runtime_next@VERSION 0.20130412 - GOMP_loop_runtime_start@GOMP_1.0 0.20131209 GOMP_loop_runtime_start@VERSION 0.20130412 - GOMP_loop_start@GOMP_5.0 13 GOMP_loop_start@VERSION 13 - GOMP_loop_static_next@GOMP_1.0 0.20131209 GOMP_loop_static_next@VERSION 0.20130412 - GOMP_loop_static_start@GOMP_1.0 0.20131209 GOMP_loop_static_start@VERSION 0.20130412 - GOMP_loop_ull_doacross_dynamic_start@GOMP_4.5 7 GOMP_loop_ull_doacross_dynamic_start@VERSION 7 - GOMP_loop_ull_doacross_guided_start@GOMP_4.5 7 GOMP_loop_ull_doacross_guided_start@VERSION 7 - GOMP_loop_ull_doacross_runtime_start@GOMP_4.5 7 GOMP_loop_ull_doacross_runtime_start@VERSION 7 - GOMP_loop_ull_doacross_start@GOMP_5.0 13 GOMP_loop_ull_doacross_start@VERSION 13 - GOMP_loop_ull_doacross_static_start@GOMP_4.5 7 GOMP_loop_ull_doacross_static_start@VERSION 7 - GOMP_loop_ull_dynamic_next@GOMP_2.0 0.20131209 GOMP_loop_ull_dynamic_next@VERSION 0.20130412 - GOMP_loop_ull_dynamic_start@GOMP_2.0 0.20131209 GOMP_loop_ull_dynamic_start@VERSION 0.20130412 - GOMP_loop_ull_guided_next@GOMP_2.0 0.20131209 GOMP_loop_ull_guided_next@VERSION 0.20130412 - GOMP_loop_ull_guided_start@GOMP_2.0 0.20131209 GOMP_loop_ull_guided_start@VERSION 0.20130412 - GOMP_loop_ull_maybe_nonmonotonic_runtime_next@GOMP_5.0 11 GOMP_loop_ull_maybe_nonmonotonic_runtime_next@VERSION 11 - GOMP_loop_ull_maybe_nonmonotonic_runtime_start@GOMP_5.0 11 GOMP_loop_ull_maybe_nonmonotonic_runtime_start@VERSION 11 - GOMP_loop_ull_nonmonotonic_dynamic_next@GOMP_4.5 10 GOMP_loop_ull_nonmonotonic_dynamic_next@VERSION 10 - GOMP_loop_ull_nonmonotonic_dynamic_start@GOMP_4.5 10 GOMP_loop_ull_nonmonotonic_dynamic_start@VERSION 10 - GOMP_loop_ull_nonmonotonic_guided_next@GOMP_4.5 10 GOMP_loop_ull_nonmonotonic_guided_next@VERSION 10 - GOMP_loop_ull_nonmonotonic_guided_start@GOMP_4.5 10 GOMP_loop_ull_nonmonotonic_guided_start@VERSION 10 - GOMP_loop_ull_nonmonotonic_runtime_next@GOMP_5.0 11 GOMP_loop_ull_nonmonotonic_runtime_next@VERSION 11 - GOMP_loop_ull_nonmonotonic_runtime_start@GOMP_5.0 11 GOMP_loop_ull_nonmonotonic_runtime_start@VERSION 11 - GOMP_loop_ull_ordered_dynamic_next@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_dynamic_next@VERSION 0.20130412 - GOMP_loop_ull_ordered_dynamic_start@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_dynamic_start@VERSION 0.20130412 - GOMP_loop_ull_ordered_guided_next@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_guided_next@VERSION 0.20130412 - GOMP_loop_ull_ordered_guided_start@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_guided_start@VERSION 0.20130412 - GOMP_loop_ull_ordered_runtime_next@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_runtime_next@VERSION 0.20130412 - GOMP_loop_ull_ordered_runtime_start@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_runtime_start@VERSION 0.20130412 - GOMP_loop_ull_ordered_start@GOMP_5.0 13 GOMP_loop_ull_ordered_start@VERSION 13 - GOMP_loop_ull_ordered_static_next@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_static_next@VERSION 0.20130412 - GOMP_loop_ull_ordered_static_start@GOMP_2.0 0.20131209 GOMP_loop_ull_ordered_static_start@VERSION 0.20130412 - GOMP_loop_ull_runtime_next@GOMP_2.0 0.20131209 GOMP_loop_ull_runtime_next@VERSION 0.20130412 - GOMP_loop_ull_runtime_start@GOMP_2.0 0.20131209 GOMP_loop_ull_runtime_start@VERSION 0.20130412 - GOMP_loop_ull_start@GOMP_5.0 13 GOMP_loop_ull_start@VERSION 13 - GOMP_loop_ull_static_next@GOMP_2.0 0.20131209 GOMP_loop_ull_static_next@VERSION 0.20130412 - GOMP_loop_ull_static_start@GOMP_2.0 0.20131209 GOMP_loop_ull_static_start@VERSION 0.20130412 - GOMP_ordered_end@GOMP_1.0 0.20131209 GOMP_ordered_end@VERSION 0.20130412 - GOMP_ordered_start@GOMP_1.0 0.20131209 GOMP_ordered_start@VERSION 0.20130412 - GOMP_parallel@GOMP_4.0 0.20140926 GOMP_parallel@VERSION 0.20140926 - GOMP_parallel_end@GOMP_1.0 0.20131209 GOMP_parallel_end@VERSION 0.20130412 - GOMP_parallel_loop_dynamic@GOMP_4.0 0.20140926 GOMP_parallel_loop_dynamic@VERSION 0.20140926 - GOMP_parallel_loop_dynamic_start@GOMP_1.0 0.20131209 GOMP_parallel_loop_dynamic_start@VERSION 0.20130412 - GOMP_parallel_loop_guided@GOMP_4.0 0.20140926 GOMP_parallel_loop_guided@VERSION 0.20140926 - GOMP_parallel_loop_guided_start@GOMP_1.0 0.20131209 GOMP_parallel_loop_guided_start@VERSION 0.20130412 - GOMP_parallel_loop_maybe_nonmonotonic_runtime@GOMP_5.0 11 GOMP_parallel_loop_maybe_nonmonotonic_runtime@VERSION 11 - GOMP_parallel_loop_nonmonotonic_dynamic@GOMP_4.5 10 GOMP_parallel_loop_nonmonotonic_dynamic@VERSION 10 - GOMP_parallel_loop_nonmonotonic_guided@GOMP_4.5 10 GOMP_parallel_loop_nonmonotonic_guided@VERSION 10 - GOMP_parallel_loop_nonmonotonic_runtime@GOMP_5.0 11 GOMP_parallel_loop_nonmonotonic_runtime@VERSION 11 - GOMP_parallel_loop_runtime@GOMP_4.0 0.20140926 GOMP_parallel_loop_runtime@VERSION 0.20140926 - GOMP_parallel_loop_runtime_start@GOMP_1.0 0.20131209 GOMP_parallel_loop_runtime_start@VERSION 0.20130412 - GOMP_parallel_loop_static@GOMP_4.0 0.20140926 GOMP_parallel_loop_static@VERSION 0.20140926 - GOMP_parallel_loop_static_start@GOMP_1.0 0.20131209 GOMP_parallel_loop_static_start@VERSION 0.20130412 - GOMP_parallel_reductions@GOMP_5.0 13 GOMP_parallel_reductions@VERSION 13 - GOMP_parallel_sections@GOMP_4.0 0.20140926 GOMP_parallel_sections@VERSION 0.20140926 - GOMP_parallel_sections_start@GOMP_1.0 0.20131209 GOMP_parallel_sections_start@VERSION 0.20130412 - GOMP_parallel_start@GOMP_1.0 0.20131209 GOMP_parallel_start@VERSION 0.20130412 - GOMP_sections2_start@GOMP_5.0 13 GOMP_sections2_start@VERSION 13 - GOMP_sections_end@GOMP_1.0 0.20131209 GOMP_sections_end@VERSION 0.20130412 - GOMP_sections_end_cancel@GOMP_4.0 0.20140926 GOMP_sections_end_cancel@VERSION 0.20140926 - GOMP_sections_end_nowait@GOMP_1.0 0.20131209 GOMP_sections_end_nowait@VERSION 0.20130412 - GOMP_sections_next@GOMP_1.0 0.20131209 GOMP_sections_next@VERSION 0.20130412 - GOMP_sections_start@GOMP_1.0 0.20131209 GOMP_sections_start@VERSION 0.20130412 - GOMP_single_copy_end@GOMP_1.0 0.20131209 GOMP_single_copy_end@VERSION 0.20130412 - GOMP_single_copy_start@GOMP_1.0 0.20131209 GOMP_single_copy_start@VERSION 0.20130412 - GOMP_single_start@GOMP_1.0 0.20131209 GOMP_single_start@VERSION 0.20130412 - GOMP_target@GOMP_4.0 0.20140926 GOMP_target@VERSION 0.20140926 - GOMP_target_data@GOMP_4.0 0.20140926 GOMP_target_data@VERSION 0.20140926 - GOMP_target_end_data@GOMP_4.0 0.20140926 GOMP_target_end_data@VERSION 0.20140926 - GOMP_target_update@GOMP_4.0 0.20140926 GOMP_target_update@VERSION 0.20140926 - GOMP_task@GOMP_2.0 0.20131209 GOMP_task@VERSION 0.20130412 - GOMP_task_reduction_remap@GOMP_5.0 13 GOMP_task_reduction_remap@VERSION 13 - GOMP_taskgroup_end@GOMP_4.0 0.20140926 GOMP_taskgroup_end@VERSION 0.20140926 - GOMP_taskgroup_reduction_register@GOMP_5.0 13 GOMP_taskgroup_reduction_register@VERSION 13 - GOMP_taskgroup_reduction_unregister@GOMP_5.0 13 GOMP_taskgroup_reduction_unregister@VERSION 13 - GOMP_taskgroup_start@GOMP_4.0 0.20140926 GOMP_taskgroup_start@VERSION 0.20140926 - GOMP_taskloop@GOMP_4.5 7 GOMP_taskloop@VERSION 7 - GOMP_taskloop_ull@GOMP_4.5 7 GOMP_taskloop_ull@VERSION 7 - GOMP_taskwait@GOMP_2.0 0.20131209 GOMP_taskwait@VERSION 0.20130412 - GOMP_taskwait_depend@GOMP_5.0 12 GOMP_taskwait_depend@VERSION 12 - GOMP_taskyield@GOMP_3.0 0.20131209 GOMP_taskyield@VERSION 0.20131209 - GOMP_teams@GOMP_4.0 0.20140926 GOMP_teams@VERSION 0.20140926 - GOMP_teams_reg@GOMP_5.0 12 GOMP_teams_reg@VERSION 12 - GOMP_workshare_task_reduction_unregister@GOMP_5.0 13 GOMP_workshare_task_reduction_unregister@VERSION 13 - OMP_1.0@OMP_1.0 0.20131209 - OMP_2.0@OMP_2.0 0.20131209 - OMP_3.0@OMP_3.0 0.20131209 - OMP_3.1@OMP_3.1 0.20131209 - OMP_4.0@OMP_4.0 0.20131209 - OMP_4.5@OMP_4.5 7 - OMP_5.0@OMP_5.0 13 - VERSION@VERSION 0.20130412 ___kmp_allocate@VERSION 0.20130412 ___kmp_free@VERSION 0.20130412 __kmp_acquire_drdpa_lock@VERSION 0.20130715 @@ -327,21 +200,6 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_cmplx10_sub_rev@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_cmplx10_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_cmplx10_wr@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_cmplx16_add@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_cmplx16_div@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_cmplx16_mul@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_rd@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_cmplx16_sub@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_swp@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_cmplx16_wr@VERSION 0.20130412 __kmpc_atomic_cmplx4_add@VERSION 0.20130412 __kmpc_atomic_cmplx4_add_cmplx8@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_cmplx4_add_cpt@VERSION 0.20130412 @@ -379,21 +237,15 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_end@VERSION 0.20130412 (arch=!ppc64 !ppc64el)__kmpc_atomic_fixed1_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed1_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed1_add_fp@VERSION 0.20130412 __kmpc_atomic_fixed1_andb@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_andb_cpt@VERSION 0.20130412 __kmpc_atomic_fixed1_andl@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_andl_cpt@VERSION 0.20130412 __kmpc_atomic_fixed1_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_div_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_fixed1_div_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed1_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_div_rev_fp@VERSION 4.0 __kmpc_atomic_fixed1_eqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_eqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed1_max@VERSION 0.20130412 @@ -402,9 +254,7 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_min_cpt@VERSION 0.20130412 __kmpc_atomic_fixed1_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed1_mul_cpt_fp@VERSION 4.0 __kmpc_atomic_fixed1_mul_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed1_mul_fp@VERSION 0.20130412 __kmpc_atomic_fixed1_neqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_neqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed1_orb@VERSION 0.20130412 @@ -422,53 +272,31 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_shr_rev@VERSION 0.20130412 __kmpc_atomic_fixed1_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed1_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_wr@VERSION 0.20130412 __kmpc_atomic_fixed1_xor@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1_xor_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed1u_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !loong64)__kmpc_atomic_fixed1u_add_fp@VERSION 4.0 __kmpc_atomic_fixed1u_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1u_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1u_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed1u_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1u_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_div_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed1u_mul_fp@VERSION 4.0 __kmpc_atomic_fixed1u_shr@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed1u_shr_cpt@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1u_shr_cpt_rev@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed1u_shr_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_sub_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed1u_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed1u_sub_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !arm64)__kmpc_atomic_fixed1u_sub_rev_fp@VERSION 5.0 __kmpc_atomic_fixed2_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed2_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed2_add_fp@VERSION 0.20130412 __kmpc_atomic_fixed2_andb@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_andb_cpt@VERSION 0.20130412 __kmpc_atomic_fixed2_andl@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_andl_cpt@VERSION 0.20130412 __kmpc_atomic_fixed2_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_div_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_fixed2_div_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed2_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_div_rev_fp@VERSION 4.0 __kmpc_atomic_fixed2_eqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_eqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed2_max@VERSION 0.20130412 @@ -477,9 +305,7 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_min_cpt@VERSION 0.20130412 __kmpc_atomic_fixed2_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed2_mul_cpt_fp@VERSION 4.0 __kmpc_atomic_fixed2_mul_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed2_mul_fp@VERSION 0.20130412 __kmpc_atomic_fixed2_neqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_neqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed2_orb@VERSION 0.20130412 @@ -497,53 +323,31 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_shr_rev@VERSION 0.20130412 __kmpc_atomic_fixed2_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed2_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_wr@VERSION 0.20130412 __kmpc_atomic_fixed2_xor@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2_xor_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed2u_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !loong64)__kmpc_atomic_fixed2u_add_fp@VERSION 4.0 __kmpc_atomic_fixed2u_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2u_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2u_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed2u_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2u_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_div_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed2u_mul_fp@VERSION 4.0 __kmpc_atomic_fixed2u_shr@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed2u_shr_cpt@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2u_shr_cpt_rev@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed2u_shr_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_sub_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed2u_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed2u_sub_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !arm64)__kmpc_atomic_fixed2u_sub_rev_fp@VERSION 5.0 __kmpc_atomic_fixed4_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed4_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed4_add_fp@VERSION 0.20130412 __kmpc_atomic_fixed4_andb@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_andb_cpt@VERSION 0.20130412 __kmpc_atomic_fixed4_andl@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_andl_cpt@VERSION 0.20130412 __kmpc_atomic_fixed4_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_div_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_fixed4_div_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed4_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_div_rev_fp@VERSION 4.0 __kmpc_atomic_fixed4_eqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_eqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed4_max@VERSION 0.20130412 @@ -552,9 +356,7 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_min_cpt@VERSION 0.20130412 __kmpc_atomic_fixed4_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed4_mul_cpt_fp@VERSION 4.0 __kmpc_atomic_fixed4_mul_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed4_mul_fp@VERSION 0.20130412 __kmpc_atomic_fixed4_neqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_neqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed4_orb@VERSION 0.20130412 @@ -572,53 +374,31 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_shr_rev@VERSION 0.20130412 __kmpc_atomic_fixed4_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed4_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_wr@VERSION 0.20130412 __kmpc_atomic_fixed4_xor@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4_xor_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed4u_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !loong64)__kmpc_atomic_fixed4u_add_fp@VERSION 4.0 (arch=!ppc64 !ppc64el)__kmpc_atomic_fixed4u_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4u_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4u_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed4u_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4u_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_div_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed4u_mul_fp@VERSION 4.0 __kmpc_atomic_fixed4u_shr@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed4u_shr_cpt@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4u_shr_cpt_rev@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed4u_shr_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_sub_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed4u_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed4u_sub_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !arm64)__kmpc_atomic_fixed4u_sub_rev_fp@VERSION 5.0 (arch=!ppc64 !ppc64el)__kmpc_atomic_fixed8_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed8_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed8_add_fp@VERSION 0.20130412 __kmpc_atomic_fixed8_andb@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_andb_cpt@VERSION 0.20130412 __kmpc_atomic_fixed8_andl@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_andl_cpt@VERSION 0.20130412 __kmpc_atomic_fixed8_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_div_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_fixed8_div_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed8_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_div_rev_fp@VERSION 4.0 __kmpc_atomic_fixed8_eqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_eqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed8_max@VERSION 0.20130412 @@ -627,9 +407,7 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_min_cpt@VERSION 0.20130412 __kmpc_atomic_fixed8_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed8_mul_cpt_fp@VERSION 4.0 __kmpc_atomic_fixed8_mul_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_fixed8_mul_fp@VERSION 0.20130412 __kmpc_atomic_fixed8_neqv@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_neqv_cpt@VERSION 0.20130412 __kmpc_atomic_fixed8_orb@VERSION 0.20130412 @@ -647,150 +425,79 @@ (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_shr_rev@VERSION 0.20130412 __kmpc_atomic_fixed8_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed8_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_wr@VERSION 0.20130412 __kmpc_atomic_fixed8_xor@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8_xor_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_fixed8u_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !loong64)__kmpc_atomic_fixed8u_add_fp@VERSION 4.0 __kmpc_atomic_fixed8u_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8u_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8u_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_fixed8u_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8u_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_div_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed8u_mul_fp@VERSION 4.0 __kmpc_atomic_fixed8u_shr@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_fixed8u_shr_cpt@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8u_shr_cpt_rev@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_fixed8u_shr_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_sub_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_fixed8u_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)__kmpc_atomic_fixed8u_sub_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !arm64)__kmpc_atomic_fixed8u_sub_rev_fp@VERSION 5.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float10_add_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float10_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_div_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_max@VERSION 14 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_max_cpt@VERSION 14 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_min@VERSION 14 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_min_cpt@VERSION 14 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float10_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float10_mul_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_rd@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float10_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float10_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float10_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float10_wr@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_add@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_div@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_max@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_max_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_min@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_min_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_mul@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_rd@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float16_sub@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_swp@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float16_wr@VERSION 0.20130412 __kmpc_atomic_float4_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float4_add_cpt_fp@VERSION 4.0 (arch=!ppc64 !ppc64el)__kmpc_atomic_float4_add_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float4_add_fp@VERSION 0.20130412 __kmpc_atomic_float4_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float4_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_div_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_float4_div_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float4_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float4_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_div_rev_fp@VERSION 4.0 __kmpc_atomic_float4_max@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_max_cpt@VERSION 0.20130412 __kmpc_atomic_float4_min@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_min_cpt@VERSION 0.20130412 __kmpc_atomic_float4_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float4_mul_cpt_fp@VERSION 4.0 __kmpc_atomic_float4_mul_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float4_mul_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_rd@VERSION 0.20130412 __kmpc_atomic_float4_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float4_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_sub_cpt_rev_fp@VERSION 4.0 __kmpc_atomic_float4_sub_float8@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float4_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float4_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float4_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float4_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float4_wr@VERSION 0.20130412 __kmpc_atomic_float8_add@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_add_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float8_add_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float8_add_fp@VERSION 0.20130412 __kmpc_atomic_float8_div@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_div_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_div_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float8_div_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_div_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float8_div_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float8_div_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_div_rev_fp@VERSION 4.0 __kmpc_atomic_float8_max@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_max_cpt@VERSION 0.20130412 __kmpc_atomic_float8_min@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_min_cpt@VERSION 0.20130412 __kmpc_atomic_float8_mul@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_mul_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)__kmpc_atomic_float8_mul_cpt_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf !loong64)__kmpc_atomic_float8_mul_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_rd@VERSION 0.20130412 __kmpc_atomic_float8_sub@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_sub_cpt@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_sub_cpt_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float8_sub_cpt_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_sub_cpt_rev_fp@VERSION 4.0 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !armel !armhf)__kmpc_atomic_float8_sub_fp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float8_sub_rev@VERSION 0.20130412 -#MISSING: 7# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf)__kmpc_atomic_float8_sub_rev_fp@VERSION 4.0 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64 !loong64)__kmpc_atomic_float8_swp@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_float8_wr@VERSION 0.20130412 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !riscv64)__kmpc_atomic_start@VERSION 0.20130412 @@ -820,6 +527,7 @@ __kmpc_destroy_allocator@VERSION 9 __kmpc_destroy_lock@VERSION 0.20130412 __kmpc_destroy_nest_lock@VERSION 0.20130412 + __kmpc_dispatch_deinit@VERSION 1:19.1.6 __kmpc_dispatch_fini_4@VERSION 0.20130412 __kmpc_dispatch_fini_4u@VERSION 0.20130412 __kmpc_dispatch_fini_8@VERSION 0.20130412 @@ -874,6 +582,9 @@ __kmpc_get_target_offload@VERSION 7 __kmpc_get_taskid@VERSION 0.20130412 __kmpc_global_num_threads@VERSION 0.20130412 + __kmpc_push_num_threads_list@VERSION 1:19.1.6 + __kmpc_push_num_threads_list_strict@VERSION 1:19.1.6 + __kmpc_push_num_threads_strict@VERSION 1:19.1.6 __kmpc_global_thread_num@VERSION 0.20130412 __kmpc_in_parallel@VERSION 0.20130412 __kmpc_init_allocator@VERSION 9 @@ -1031,14 +742,11 @@ kmpc_set_stacksize@VERSION 0.20130412 kmpc_set_stacksize_s@VERSION 0.20130412 kmpc_unset_affinity_mask_proc@VERSION 0.20130412 -#MISSING: 14# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf !loong64)libomp_start_tool@VERSION 14 omp_aligned_alloc@VERSION 14 omp_aligned_calloc@VERSION 14 omp_alloc@VERSION 8 omp_calloc@VERSION 12 - omp_capture_affinity@OMP_5.0 13 omp_capture_affinity@VERSION 8 - omp_capture_affinity_@OMP_5.0 13 omp_capture_affinity_@VERSION 8 omp_cgroup_mem_alloc@VERSION 8 omp_const_mem_alloc@VERSION 8 @@ -1049,58 +757,34 @@ omp_default_mem_space@VERSION 9 omp_destroy_allocator@VERSION 9 omp_destroy_allocator_@VERSION 9 - omp_destroy_lock@OMP_1.0 0.20131209 - omp_destroy_lock@OMP_3.0 0.20131209 omp_destroy_lock@VERSION 0.20130412 - omp_destroy_lock_@OMP_1.0 0.20131209 - omp_destroy_lock_@OMP_3.0 0.20131209 omp_destroy_lock_@VERSION 0.20130412 - omp_destroy_nest_lock@OMP_1.0 0.20131209 - omp_destroy_nest_lock@OMP_3.0 0.20131209 omp_destroy_nest_lock@VERSION 0.20130412 - omp_destroy_nest_lock_@OMP_1.0 0.20131209 - omp_destroy_nest_lock_@OMP_3.0 0.20131209 omp_destroy_nest_lock_@VERSION 0.20130412 - omp_display_affinity@OMP_5.0 13 omp_display_affinity@VERSION 8 - omp_display_affinity_@OMP_5.0 13 omp_display_affinity_@VERSION 8 omp_display_env@VERSION 11 omp_display_env_@VERSION 11 omp_free@VERSION 8 omp_fulfill_event@VERSION 9 omp_fulfill_event_@VERSION 9 - omp_get_active_level@OMP_3.0 0.20131209 omp_get_active_level@VERSION 0.20130412 - omp_get_active_level_@OMP_3.0 0.20131209 omp_get_active_level_@VERSION 0.20130412 - omp_get_affinity_format@OMP_5.0 13 omp_get_affinity_format@VERSION 8 - omp_get_affinity_format_@OMP_5.0 13 omp_get_affinity_format_@VERSION 8 - omp_get_ancestor_thread_num@OMP_3.0 0.20131209 omp_get_ancestor_thread_num@VERSION 0.20130412 - omp_get_ancestor_thread_num_@OMP_3.0 0.20131209 omp_get_ancestor_thread_num_@VERSION 0.20130412 - omp_get_cancellation@OMP_4.0 0.20131209 omp_get_cancellation@VERSION 0.20131209 - omp_get_cancellation_@OMP_4.0 0.20131209 omp_get_cancellation_@VERSION 0.20131209 omp_get_default_allocator@VERSION 8 omp_get_default_allocator_@VERSION 8 - omp_get_default_device@OMP_4.0 4.0 omp_get_default_device@VERSION 4.0 - omp_get_default_device_@OMP_4.0 4.0 omp_get_default_device_@VERSION 4.0 omp_get_device_num@VERSION 8 omp_get_device_num_@VERSION 8 - omp_get_dynamic@OMP_1.0 0.20131209 omp_get_dynamic@VERSION 0.20130412 - omp_get_dynamic_@OMP_1.0 0.20131209 omp_get_dynamic_@VERSION 0.20130412 - omp_get_initial_device@OMP_4.5 13 omp_get_initial_device@VERSION 8 - omp_get_initial_device_@OMP_4.5 13 omp_get_initial_device_@VERSION 8 omp_get_interop_int@VERSION 17 omp_get_interop_int_@VERSION 17 @@ -1114,226 +798,123 @@ omp_get_interop_str_@VERSION 17 omp_get_interop_type_desc@VERSION 17 omp_get_interop_type_desc_@VERSION 17 - omp_get_level@OMP_3.0 0.20131209 omp_get_level@VERSION 0.20130412 - omp_get_level_@OMP_3.0 0.20131209 omp_get_level_@VERSION 0.20130412 - omp_get_max_active_levels@OMP_3.0 0.20131209 omp_get_max_active_levels@VERSION 0.20130412 - omp_get_max_active_levels_@OMP_3.0 0.20131209 omp_get_max_active_levels_@VERSION 0.20130412 - omp_get_max_task_priority@OMP_4.5 7 omp_get_max_task_priority@VERSION 3.9.0 - omp_get_max_task_priority_@OMP_4.5 7 omp_get_max_task_priority_@VERSION 3.9.0 omp_get_max_teams@VERSION 13 omp_get_max_teams_@VERSION 13 - omp_get_max_threads@OMP_1.0 0.20131209 omp_get_max_threads@VERSION 0.20130412 - omp_get_max_threads_@OMP_1.0 0.20131209 omp_get_max_threads_@VERSION 0.20130412 - omp_get_nested@OMP_1.0 0.20131209 omp_get_nested@VERSION 0.20130412 - omp_get_nested_@OMP_1.0 0.20131209 omp_get_nested_@VERSION 0.20130412 - omp_get_num_devices@OMP_4.0 8 omp_get_num_devices@VERSION 8 - omp_get_num_devices_@OMP_4.0 8 omp_get_num_devices_@VERSION 8 omp_get_num_interop_properties@VERSION 17 omp_get_num_interop_properties_@VERSION 17 - omp_get_num_places@OMP_4.5 7 omp_get_num_places@VERSION 3.9.0 - omp_get_num_places_@OMP_4.5 7 omp_get_num_places_@VERSION 3.9.0 - omp_get_num_procs@OMP_1.0 0.20131209 omp_get_num_procs@VERSION 0.20130412 - omp_get_num_procs_@OMP_1.0 0.20131209 omp_get_num_procs_@VERSION 0.20130412 - omp_get_num_teams@OMP_4.0 0.20131209 omp_get_num_teams@VERSION 0.20130715 - omp_get_num_teams_@OMP_4.0 0.20131209 omp_get_num_teams_@VERSION 0.20130715 - omp_get_num_threads@OMP_1.0 0.20131209 omp_get_num_threads@VERSION 0.20130412 - omp_get_num_threads_@OMP_1.0 0.20131209 omp_get_num_threads_@VERSION 0.20130412 - omp_get_partition_num_places@OMP_4.5 7 omp_get_partition_num_places@VERSION 3.9.0 - omp_get_partition_num_places_@OMP_4.5 7 omp_get_partition_num_places_@VERSION 3.9.0 - omp_get_partition_place_nums@OMP_4.5 7 omp_get_partition_place_nums@VERSION 3.9.0 - omp_get_partition_place_nums_@OMP_4.5 7 omp_get_partition_place_nums_@VERSION 3.9.0 - omp_get_place_num@OMP_4.5 7 omp_get_place_num@VERSION 3.9.0 - omp_get_place_num_@OMP_4.5 7 omp_get_place_num_@VERSION 3.9.0 - omp_get_place_num_procs@OMP_4.5 7 omp_get_place_num_procs@VERSION 3.9.0 - omp_get_place_num_procs_@OMP_4.5 7 omp_get_place_num_procs_@VERSION 3.9.0 - omp_get_place_proc_ids@OMP_4.5 7 omp_get_place_proc_ids@VERSION 3.9.0 - omp_get_place_proc_ids_@OMP_4.5 7 omp_get_place_proc_ids_@VERSION 3.9.0 - omp_get_proc_bind@OMP_4.0 0.20131209 omp_get_proc_bind@VERSION 0.20130412 - omp_get_proc_bind_@OMP_4.0 0.20131209 omp_get_proc_bind_@VERSION 0.20130412 - omp_get_schedule@OMP_3.0 0.20131209 omp_get_schedule@VERSION 0.20130412 - omp_get_schedule_@OMP_3.0 0.20131209 omp_get_schedule_@VERSION 0.20130412 omp_get_supported_active_levels@VERSION 9 omp_get_supported_active_levels_@VERSION 9 - omp_get_team_num@OMP_4.0 0.20131209 omp_get_team_num@VERSION 0.20130715 - omp_get_team_num_@OMP_4.0 0.20131209 omp_get_team_num_@VERSION 0.20130715 - omp_get_team_size@OMP_3.0 0.20131209 omp_get_team_size@VERSION 0.20130412 - omp_get_team_size_@OMP_3.0 0.20131209 omp_get_team_size_@VERSION 0.20130412 omp_get_teams_thread_limit@VERSION 13 omp_get_teams_thread_limit_@VERSION 13 - omp_get_thread_limit@OMP_3.0 0.20131209 omp_get_thread_limit@VERSION 0.20130412 - omp_get_thread_limit_@OMP_3.0 0.20131209 omp_get_thread_limit_@VERSION 0.20130412 - omp_get_thread_num@OMP_1.0 0.20131209 omp_get_thread_num@VERSION 0.20130412 - omp_get_thread_num_@OMP_1.0 0.20131209 omp_get_thread_num_@VERSION 0.20130412 - omp_get_wtick@OMP_2.0 0.20131209 omp_get_wtick@VERSION 0.20130412 - omp_get_wtick_@OMP_2.0 0.20131209 omp_get_wtick_@VERSION 0.20130412 - omp_get_wtime@OMP_2.0 0.20131209 omp_get_wtime@VERSION 0.20130412 - omp_get_wtime_@OMP_2.0 0.20131209 omp_get_wtime_@VERSION 0.20130412 omp_high_bw_mem_alloc@VERSION 8 omp_high_bw_mem_space@VERSION 9 omp_in_explicit_task@VERSION 17 omp_in_explicit_task_@VERSION 17 - omp_in_final@OMP_3.1 0.20131209 omp_in_final@VERSION 0.20130412 - omp_in_final_@OMP_3.1 0.20131209 omp_in_final_@VERSION 0.20130412 - omp_in_parallel@OMP_1.0 0.20131209 omp_in_parallel@VERSION 0.20130412 - omp_in_parallel_@OMP_1.0 0.20131209 omp_in_parallel_@VERSION 0.20130412 omp_init_allocator@VERSION 9 omp_init_allocator_@VERSION 9 - omp_init_lock@OMP_1.0 0.20131209 - omp_init_lock@OMP_3.0 0.20131209 omp_init_lock@VERSION 0.20130412 - omp_init_lock_@OMP_1.0 0.20131209 - omp_init_lock_@OMP_3.0 0.20131209 omp_init_lock_@VERSION 0.20130412 omp_init_lock_with_hint@VERSION 3.8.0 omp_init_lock_with_hint_@VERSION 3.8.0 - omp_init_nest_lock@OMP_1.0 0.20131209 - omp_init_nest_lock@OMP_3.0 0.20131209 omp_init_nest_lock@VERSION 0.20130412 - omp_init_nest_lock_@OMP_1.0 0.20131209 - omp_init_nest_lock_@OMP_3.0 0.20131209 omp_init_nest_lock_@VERSION 0.20130412 omp_init_nest_lock_with_hint@VERSION 3.8.0 omp_init_nest_lock_with_hint_@VERSION 3.8.0 - omp_is_initial_device@OMP_4.0 0.20141212 omp_is_initial_device@VERSION 0.20141212 - omp_is_initial_device_@OMP_4.0 0.20141212 omp_is_initial_device_@VERSION 0.20141212 omp_large_cap_mem_alloc@VERSION 8 omp_large_cap_mem_space@VERSION 9 omp_low_lat_mem_alloc@VERSION 8 omp_low_lat_mem_space@VERSION 9 omp_null_allocator@VERSION 9 - omp_pause_resource@OMP_5.0 13 omp_pause_resource@VERSION 9 - omp_pause_resource_@OMP_5.0 13 omp_pause_resource_@VERSION 9 - omp_pause_resource_all@OMP_5.0 13 omp_pause_resource_all@VERSION 9 - omp_pause_resource_all_@OMP_5.0 13 omp_pause_resource_all_@VERSION 9 omp_pteam_mem_alloc@VERSION 8 omp_realloc@VERSION 12 - omp_set_affinity_format@OMP_5.0 13 omp_set_affinity_format@VERSION 8 - omp_set_affinity_format_@OMP_5.0 13 omp_set_affinity_format_@VERSION 8 omp_set_default_allocator@VERSION 8 omp_set_default_allocator_@VERSION 8 - omp_set_default_device@OMP_4.0 4.0 omp_set_default_device@VERSION 4.0 - omp_set_default_device_@OMP_4.0 4.0 omp_set_default_device_@VERSION 4.0 - omp_set_dynamic@OMP_1.0 0.20131209 omp_set_dynamic@VERSION 0.20130412 - omp_set_dynamic_@OMP_1.0 0.20131209 omp_set_dynamic_@VERSION 0.20130412 - omp_set_lock@OMP_1.0 0.20131209 - omp_set_lock@OMP_3.0 0.20131209 omp_set_lock@VERSION 0.20130412 - omp_set_lock_@OMP_1.0 0.20131209 - omp_set_lock_@OMP_3.0 0.20131209 omp_set_lock_@VERSION 0.20130412 - omp_set_max_active_levels@OMP_3.0 0.20131209 omp_set_max_active_levels@VERSION 0.20130412 - omp_set_max_active_levels_@OMP_3.0 0.20131209 omp_set_max_active_levels_@VERSION 0.20130412 - omp_set_nest_lock@OMP_1.0 0.20131209 - omp_set_nest_lock@OMP_3.0 0.20131209 omp_set_nest_lock@VERSION 0.20130412 - omp_set_nest_lock_@OMP_1.0 0.20131209 - omp_set_nest_lock_@OMP_3.0 0.20131209 omp_set_nest_lock_@VERSION 0.20130412 - omp_set_nested@OMP_1.0 0.20131209 omp_set_nested@VERSION 0.20130412 - omp_set_nested_@OMP_1.0 0.20131209 omp_set_nested_@VERSION 0.20130412 omp_set_num_teams@VERSION 13 omp_set_num_teams_@VERSION 13 - omp_set_num_threads@OMP_1.0 0.20131209 omp_set_num_threads@VERSION 0.20130412 - omp_set_num_threads_@OMP_1.0 0.20131209 omp_set_num_threads_@VERSION 0.20130412 - omp_set_schedule@OMP_3.0 0.20131209 omp_set_schedule@VERSION 0.20130412 - omp_set_schedule_@OMP_3.0 0.20131209 omp_set_schedule_@VERSION 0.20130412 omp_set_teams_thread_limit@VERSION 13 omp_set_teams_thread_limit_@VERSION 13 -#MISSING: 8# (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !arm64 !armel !armhf !loong64)omp_state_info@VERSION 6.0 - omp_test_lock@OMP_1.0 0.20131209 - omp_test_lock@OMP_3.0 0.20131209 omp_test_lock@VERSION 0.20130412 - omp_test_lock_@OMP_1.0 0.20131209 - omp_test_lock_@OMP_3.0 0.20131209 omp_test_lock_@VERSION 0.20130412 - omp_test_nest_lock@OMP_1.0 0.20131209 - omp_test_nest_lock@OMP_3.0 0.20131209 omp_test_nest_lock@VERSION 0.20130412 - omp_test_nest_lock_@OMP_1.0 0.20131209 - omp_test_nest_lock_@OMP_3.0 0.20131209 omp_test_nest_lock_@VERSION 0.20130412 omp_thread_mem_alloc@VERSION 8 - omp_unset_lock@OMP_1.0 0.20131209 - omp_unset_lock@OMP_3.0 0.20131209 omp_unset_lock@VERSION 0.20130412 - omp_unset_lock_@OMP_1.0 0.20131209 - omp_unset_lock_@OMP_3.0 0.20131209 omp_unset_lock_@VERSION 0.20130412 - omp_unset_nest_lock@OMP_1.0 0.20131209 - omp_unset_nest_lock@OMP_3.0 0.20131209 omp_unset_nest_lock@VERSION 0.20130412 - omp_unset_nest_lock_@OMP_1.0 0.20131209 - omp_unset_nest_lock_@OMP_3.0 0.20131209 omp_unset_nest_lock_@VERSION 0.20130412 ompc_capture_affinity@VERSION 8 ompc_display_affinity@VERSION 8 @@ -1348,190 +929,5 @@ ompc_set_schedule@VERSION 0.20130412 ompt_libomp_connect@VERSION 17 (arch=!mips !mipsel !ppc64 !ppc64el !mips64 !mips64el !armel !armhf)ompt_start_tool@VERSION 6.0 -libomptarget.rtl.amdgpu.so.@LLVM_VERSION@ libomp5-@LLVM_VERSION@ #MINVER# - VERS1.0@VERS1.0 17 - __tgt_rtl_create_event@VERS1.0 17 - __tgt_rtl_data_alloc@VERS1.0 17 - __tgt_rtl_data_delete@VERS1.0 17 - __tgt_rtl_data_exchange@VERS1.0 17 - __tgt_rtl_data_exchange_async@VERS1.0 17 - __tgt_rtl_data_lock@VERS1.0 17 - __tgt_rtl_data_notify_mapped@VERS1.0 17 - __tgt_rtl_data_notify_unmapped@VERS1.0 17 - __tgt_rtl_data_retrieve@VERS1.0 17 - __tgt_rtl_data_retrieve_async@VERS1.0 17 - __tgt_rtl_data_submit@VERS1.0 17 - __tgt_rtl_data_submit_async@VERS1.0 17 - __tgt_rtl_data_unlock@VERS1.0 17 - __tgt_rtl_destroy_event@VERS1.0 17 - __tgt_rtl_get_function@VERS1.0 18 - __tgt_rtl_get_global@VERS1.0 18 - __tgt_rtl_init_async_info@VERS1.0 17 - __tgt_rtl_init_device@VERS1.0 17 - __tgt_rtl_init_device_info@VERS1.0 17 - __tgt_rtl_init_plugin@VERS1.0 17 - __tgt_rtl_init_requires@VERS1.0 17 - __tgt_rtl_initialize_record_replay@VERS1.0 18 - __tgt_rtl_is_data_exchangable@VERS1.0 17 - __tgt_rtl_is_valid_binary@VERS1.0 18 - __tgt_rtl_launch_kernel@VERS1.0 17 - __tgt_rtl_load_binary@VERS1.0 17 - __tgt_rtl_number_of_devices@VERS1.0 17 - __tgt_rtl_print_device_info@VERS1.0 17 - __tgt_rtl_query_async@VERS1.0 17 - __tgt_rtl_record_event@VERS1.0 17 - __tgt_rtl_set_device_offset@VERS1.0 18 - __tgt_rtl_set_info_flag@VERS1.0 17 -#MISSING: 19# __tgt_rtl_supports_empty_images@VERS1.0 17 - __tgt_rtl_sync_event@VERS1.0 17 - __tgt_rtl_synchronize@VERS1.0 17 - __tgt_rtl_use_auto_zero_copy@VERS1.0 18 - __tgt_rtl_wait_event@VERS1.0 17 -libomptarget.rtl.cuda.so.@LLVM_VERSION@ libomp5-@LLVM_VERSION@ #MINVER# - VERS1.0@VERS1.0 17 - __tgt_rtl_create_event@VERS1.0 17 - __tgt_rtl_data_alloc@VERS1.0 17 - __tgt_rtl_data_delete@VERS1.0 17 - __tgt_rtl_data_exchange@VERS1.0 17 - __tgt_rtl_data_exchange_async@VERS1.0 17 - __tgt_rtl_data_lock@VERS1.0 17 - __tgt_rtl_data_notify_mapped@VERS1.0 17 - __tgt_rtl_data_notify_unmapped@VERS1.0 17 - __tgt_rtl_data_retrieve@VERS1.0 17 - __tgt_rtl_data_retrieve_async@VERS1.0 17 - __tgt_rtl_data_submit@VERS1.0 17 - __tgt_rtl_data_submit_async@VERS1.0 17 - __tgt_rtl_data_unlock@VERS1.0 17 - __tgt_rtl_destroy_event@VERS1.0 17 - __tgt_rtl_get_function@VERS1.0 18 - __tgt_rtl_get_global@VERS1.0 18 - __tgt_rtl_init_async_info@VERS1.0 17 - __tgt_rtl_init_device@VERS1.0 17 - __tgt_rtl_init_device_info@VERS1.0 17 - __tgt_rtl_init_plugin@VERS1.0 17 - __tgt_rtl_init_requires@VERS1.0 17 - __tgt_rtl_initialize_record_replay@VERS1.0 18 - __tgt_rtl_is_data_exchangable@VERS1.0 17 - __tgt_rtl_is_valid_binary@VERS1.0 18 - __tgt_rtl_launch_kernel@VERS1.0 17 - __tgt_rtl_load_binary@VERS1.0 17 - __tgt_rtl_number_of_devices@VERS1.0 17 - __tgt_rtl_print_device_info@VERS1.0 17 - __tgt_rtl_query_async@VERS1.0 17 - __tgt_rtl_record_event@VERS1.0 17 - __tgt_rtl_set_device_offset@VERS1.0 18 - __tgt_rtl_set_info_flag@VERS1.0 17 -#MISSING: 19# __tgt_rtl_supports_empty_images@VERS1.0 17 - __tgt_rtl_sync_event@VERS1.0 17 - __tgt_rtl_synchronize@VERS1.0 17 - __tgt_rtl_use_auto_zero_copy@VERS1.0 18 - __tgt_rtl_wait_event@VERS1.0 17 -libomptarget.rtl.x86_64.so.@LLVM_VERSION@ libomp5-@LLVM_VERSION@ #MINVER# - VERS1.0@VERS1.0 17 - __tgt_rtl_create_event@VERS1.0 1:17.0.1-1 - __tgt_rtl_data_alloc@VERS1.0 17 - __tgt_rtl_data_delete@VERS1.0 17 - __tgt_rtl_data_exchange@VERS1.0 17 - __tgt_rtl_data_exchange_async@VERS1.0 17 - __tgt_rtl_data_lock@VERS1.0 17 - __tgt_rtl_data_notify_mapped@VERS1.0 17 - __tgt_rtl_data_notify_unmapped@VERS1.0 17 - __tgt_rtl_data_retrieve@VERS1.0 17 - __tgt_rtl_data_retrieve_async@VERS1.0 17 - __tgt_rtl_data_submit@VERS1.0 17 - __tgt_rtl_data_submit_async@VERS1.0 17 - __tgt_rtl_data_unlock@VERS1.0 17 - __tgt_rtl_destroy_event@VERS1.0 17 - __tgt_rtl_get_function@VERS1.0 18 - __tgt_rtl_get_global@VERS1.0 18 - __tgt_rtl_init_async_info@VERS1.0 17 - __tgt_rtl_init_device@VERS1.0 17 - __tgt_rtl_init_device_info@VERS1.0 17 - __tgt_rtl_init_plugin@VERS1.0 17 - __tgt_rtl_init_requires@VERS1.0 17 - __tgt_rtl_initialize_record_replay@VERS1.0 18 - __tgt_rtl_is_data_exchangable@VERS1.0 17 - __tgt_rtl_is_valid_binary@VERS1.0 18 - __tgt_rtl_launch_kernel@VERS1.0 17 - __tgt_rtl_load_binary@VERS1.0 17 - __tgt_rtl_number_of_devices@VERS1.0 17 - __tgt_rtl_print_device_info@VERS1.0 17 - __tgt_rtl_query_async@VERS1.0 17 - __tgt_rtl_record_event@VERS1.0 17 - __tgt_rtl_set_device_offset@VERS1.0 18 - __tgt_rtl_set_info_flag@VERS1.0 17 -#MISSING: 19# __tgt_rtl_supports_empty_images@VERS1.0 17 - __tgt_rtl_sync_event@VERS1.0 17 - __tgt_rtl_synchronize@VERS1.0 17 - __tgt_rtl_use_auto_zero_copy@VERS1.0 18 - __tgt_rtl_wait_event@VERS1.0 17 -libomptarget.so.@LLVM_VERSION@ libomp5-@LLVM_VERSION@ #MINVER# - VERS1.0@VERS1.0 17 - __kmpc_push_target_tripcount@VERS1.0 17 - __kmpc_push_target_tripcount_mapper@VERS1.0 17 - __tgt_activate_record_replay@VERS1.0 18 - __tgt_init_all_rtls@VERS1.0 17 - __tgt_interop_destroy@VERS1.0 17 - __tgt_interop_init@VERS1.0 17 - __tgt_interop_use@VERS1.0 17 - __tgt_mapper_num_components@VERS1.0 17 - __tgt_print_device_info@VERS1.0 17 - __tgt_push_mapper_component@VERS1.0 17 - __tgt_register_lib@VERS1.0 17 - __tgt_register_requires@VERS1.0 17 - __tgt_set_info_flag@VERS1.0 17 - __tgt_target@VERS1.0 17 - __tgt_target_data_begin@VERS1.0 17 - __tgt_target_data_begin_mapper@VERS1.0 17 - __tgt_target_data_begin_nowait@VERS1.0 17 - __tgt_target_data_begin_nowait_mapper@VERS1.0 17 - __tgt_target_data_end@VERS1.0 17 - __tgt_target_data_end_mapper@VERS1.0 17 - __tgt_target_data_end_nowait@VERS1.0 17 - __tgt_target_data_end_nowait_mapper@VERS1.0 17 - __tgt_target_data_update@VERS1.0 17 - __tgt_target_data_update_mapper@VERS1.0 17 - __tgt_target_data_update_nowait@VERS1.0 17 - __tgt_target_data_update_nowait_mapper@VERS1.0 17 - __tgt_target_kernel@VERS1.0 17 - __tgt_target_kernel_nowait@VERS1.0 17 - __tgt_target_kernel_replay@VERS1.0 17 - __tgt_target_mapper@VERS1.0 17 - __tgt_target_nowait@VERS1.0 17 - __tgt_target_nowait_mapper@VERS1.0 17 - __tgt_target_nowait_query@VERS1.0 17 - __tgt_target_teams@VERS1.0 17 - __tgt_target_teams_mapper@VERS1.0 17 - __tgt_target_teams_nowait@VERS1.0 17 - __tgt_target_teams_nowait_mapper@VERS1.0 17 - __tgt_unregister_lib@VERS1.0 17 - llvm_omp_target_alloc_device@VERS1.0 17 - llvm_omp_target_alloc_host@VERS1.0 17 - llvm_omp_target_alloc_shared@VERS1.0 17 - llvm_omp_target_dynamic_shared_alloc@VERS1.0 17 - llvm_omp_target_free_device@VERS1.0 17 - llvm_omp_target_free_host@VERS1.0 17 - llvm_omp_target_free_shared@VERS1.0 17 - llvm_omp_target_lock_mem@VERS1.0 17 - llvm_omp_target_unlock_mem@VERS1.0 17 - omp_get_device_num@VERS1.0 17 - omp_get_initial_device@VERS1.0 17 - omp_get_interop_int@VERS1.0 17 - omp_get_interop_name@VERS1.0 17 - omp_get_interop_ptr@VERS1.0 17 - omp_get_interop_str@VERS1.0 17 - omp_get_interop_type_desc@VERS1.0 17 - omp_get_mapped_ptr@VERS1.0 17 - omp_get_num_devices@VERS1.0 17 - omp_target_alloc@VERS1.0 17 - omp_target_associate_ptr@VERS1.0 17 - omp_target_disassociate_ptr@VERS1.0 17 - omp_target_free@VERS1.0 17 - omp_target_is_present@VERS1.0 17 - omp_target_memcpy@VERS1.0 17 - omp_target_memcpy_async@VERS1.0 17 - omp_target_memcpy_rect@VERS1.0 17 - omp_target_memcpy_rect_async@VERS1.0 17 - omp_target_memset@VERS1.0 18 - omp_target_memset_async@VERS1.0 18 - ompt_libomptarget_connect@VERS1.0 17 +libomptarget.so.19.1 #PACKAGE# #MINVER# + (symver)VERS1.0 1:19 diff -Nru llvm-toolchain-19-19.1.4/debian/patches/bolt-disable-proc-check.diff llvm-toolchain-19-19.1.7/debian/patches/bolt-disable-proc-check.diff --- llvm-toolchain-19-19.1.4/debian/patches/bolt-disable-proc-check.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/patches/bolt-disable-proc-check.diff 2024-12-17 10:50:22.000000000 +0000 @@ -0,0 +1,21 @@ +bolt: Disable the check for /proc/self/map_files. Might not be available on build machines + +--- a/bolt/CMakeLists.txt ++++ b/bolt/CMakeLists.txt +@@ -42,16 +42,6 @@ if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "x8 + set(BOLT_ENABLE_RUNTIME_default ON) + endif() + option(BOLT_ENABLE_RUNTIME "Enable BOLT runtime" ${BOLT_ENABLE_RUNTIME_default}) +-if (BOLT_ENABLE_RUNTIME) +- # Some systems prevent reading /proc/self/map_files +- execute_process(COMMAND ls /proc/self/map_files +- RESULT_VARIABLE LS OUTPUT_QUIET ERROR_QUIET) +- if (LS) +- message(WARNING +- "BOLT runtime may not be able to read /proc/self/map_files. Please use +- `--instrumentation-binpath ` option.") +- endif() +-endif() + + set(BOLT_CLANG_EXE "" CACHE FILEPATH "Path to clang executable for the target \ + architecture for use in BOLT tests") diff -Nru llvm-toolchain-19-19.1.4/debian/patches/python3.13-quote.diff llvm-toolchain-19-19.1.7/debian/patches/python3.13-quote.diff --- llvm-toolchain-19-19.1.4/debian/patches/python3.13-quote.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/patches/python3.13-quote.diff 2024-12-17 10:50:22.000000000 +0000 @@ -0,0 +1,25 @@ +--- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py ++++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py +@@ -1,7 +1,10 @@ + #!/usr/bin/env python3 + +-import glob, os, pipes, sys, subprocess +- ++import glob, os, sys, subprocess ++try: ++ from pipes import quote ++except ImportError: ++ from shlex import quote + + device_id = os.environ.get("SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER") + iossim_run_verbose = os.environ.get("SANITIZER_IOSSIM_RUN_VERBOSE") +@@ -49,8 +52,7 @@ if prog == "rm": + # Don't quote glob pattern + rm_args.append(arg) + else: +- # FIXME(dliew): pipes.quote() is deprecated +- rm_args.append(pipes.quote(arg)) ++ rm_args.append(quote(arg)) + rm_cmd_line = ["/bin/rm"] + rm_args + rm_cmd_line_str = " ".join(rm_cmd_line) + # We use `shell=True` so that any wildcard globs get expanded by the shell. diff -Nru llvm-toolchain-19-19.1.4/debian/patches/series llvm-toolchain-19-19.1.7/debian/patches/series --- llvm-toolchain-19-19.1.4/debian/patches/series 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/patches/series 2024-12-17 10:50:22.000000000 +0000 @@ -138,3 +138,5 @@ env-lld-package-metadata.diff mips-mlir-xgot.diff ubuntu-plucky.patch +bolt-disable-proc-check.diff +python3.13-quote.diff diff -Nru llvm-toolchain-19-19.1.4/debian/qualify-clang.sh llvm-toolchain-19-19.1.7/debian/qualify-clang.sh --- llvm-toolchain-19-19.1.4/debian/qualify-clang.sh 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/qualify-clang.sh 2025-02-25 18:37:57.000000000 +0000 @@ -1,123 +1,185 @@ -#!/bin/bash -# Stop at the first error -set -e -if ! test -d debian/; then - echo "$0: Could not find the debian/ directory" - exit 1 -fi -VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") -DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") -DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) - -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-clang-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-rt-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libclang-rt-${VERSION}-dev-wasm64_${DETAILED_VERSION}_all.deb libc++abi-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libc++-${VERSION}-dev-wasm32_${DETAILED_VERSION}_all.deb libpolly-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb bolt-${VERSION}_${DETAILED_VERSION}_amd64.deb libbolt-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb flang-${VERSION}_${DETAILED_VERSION}_amd64.deb libflang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libllvmlibc-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb " - -echo "To install everything:" -echo "sudo apt --purge remove 'libomp5-*' 'libc++*dev' 'libc++*' 'python3-lldb-*' 'libunwind-*' 'libclc-*' 'libclc-*dev' 'libmlir-*'" -echo "sudo dpkg -i $LIST" -L="" -for f in $LIST; do - L="$L $(echo $f|cut -d_ -f1)" -done -echo "or" -echo "apt-get install $L" - -if test ! -f /usr/bin/llvm-config-$VERSION; then - echo "Install llvm-$VERSION & llvm-$VERSION-dev" - exit 1 -fi -if test ! -f /usr/lib/llvm-$VERSION/lib/libLLVM-$VERSION.so; then - echo "Install llvm-$VERSION-dev" - exit 1 -fi - -echo "Testing llvm-$VERSION and llvm-$VERSION-dev ..." -llvm-config-$VERSION --link-shared --libs &> /dev/null - -if llvm-config-$VERSION --cxxflags | grep " \-W"; then - echo "llvm-config should not export -W warnings" - exit 1 -fi - -# Test https://bugs.llvm.org/show_bug.cgi?id=40059 -nm /usr/lib/llvm-$VERSION/lib/libLLVMBitWriter.a &> foo.log -if grep "File format not recognized" foo.log; then - echo "nm libLLVMBitWriter.a contains 'File format not recognized'" - exit 1 -fi - -# Test #995684 -if test ! -f /usr/share/man/man1/llc-$VERSION.1.gz; then - echo "llvm manpage are missing (using llc as an example)" - exit 1 -fi - -if test ! -f /usr/bin/scan-build-$VERSION; then - echo "Install clang-tools-$VERSION" - exit 1 -fi -echo "Testing clang-tools-$VERSION ..." - -echo ' -void test() { - int x; - x = 1; // warn -} -'> foo.c - -# Ignore if gcc isn't available -scan-build-$VERSION -o scan-build gcc -c foo.c &> /dev/null || true -scan-build-$VERSION -o scan-build clang-$VERSION -c foo.c &> /dev/null -scan-build-$VERSION --exclude non-existing/ --exclude /tmp/ -v clang-$VERSION -c foo.c &> /dev/null -scan-build-$VERSION --exclude $(realpath $(pwd)) -v clang-$VERSION -c foo.c &> foo.log -if ! grep -q -E "scan-build: 0 bugs found." foo.log; then - echo "scan-build --exclude didn't ignore the defect" - exit 42 -fi -rm -rf scan-build - -if test ! -f /usr/bin/clang-tidy-$VERSION; then - echo "Install clang-tidy-$VERSION" - exit 1 -fi - -echo 'namespace mozilla { -namespace dom { -void foo(); -} -} -' > foo.cpp -clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' foo.cpp -extra-arg=-std=c++17 &> foo.log -if ! grep -q "nested namespaces can " foo.log; then - echo "Clang-tidy didn't detect the issue" - cat foo.log - exit 1 -fi +#!/usr/bin/env bats +setup() { -rm -rf cmaketest && mkdir cmaketest -cat > cmaketest/CMakeLists.txt < + cat > "${BATS_TMPDIR}/string_test.c" < +int main() { + (void) strcat; + return 0; +} EOF -mkdir cmaketest/standard -cp foo.cpp cmaketest/ -cd cmaketest/standard -# run with cmake -CXX=clang-$VERSION cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. > /dev/null - -clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' ../foo.cpp -extra-arg=-std=c++17 -fix &> foo.log -if ! grep -q "namespace mozilla::dom" ../foo.cpp; then - echo "clang-tidy autofix didn't work" - cat foo.log - exit 1 -fi -cd - &> /dev/null -rm -rf cmaketest + run clang-$VERSION -c "${BATS_TMPDIR}/string_test.c" + assert_success "Compilation with failed" + + # Test 2: Compile with + cat > "${BATS_TMPDIR}/errno_test.c" < +int main() {} +EOF + run clang-$VERSION "${BATS_TMPDIR}/errno_test.c" + assert_success "Compilation with failed" + + # Test 3: Compile with + cat > "${BATS_TMPDIR}/chrono_test.cpp" < +int main() {} +EOF + run clang++-$VERSION -std=c++11 "${BATS_TMPDIR}/chrono_test.cpp" + assert_success "Compilation with and C++11 standard failed" +} + + +# ===================== scan-build + +@test "Check scan-build functionality with GCC" { -echo "Testing clangd-$VERSION ..." + echo ' + void test() { + int x; + x = 1; // warn + } + '> ${BATS_TMPDIR}/scan_build_test.c + + # Run scan-build with GCC + run scan-build-$VERSION -o "${BATS_TMPDIR}/scan_build_output" gcc -c "${BATS_TMPDIR}/scan_build_test.c" + assert_success + assert_output -p "1 bug found" + + # Clean up + rm -rf "${BATS_TMPDIR}/scan_build_output" +} + +@test "Check scan-build functionality with Clang" { + + echo ' + void test() { + int x; + x = 1; // warn + } + '> ${BATS_TMPDIR}/scan_build_test.c + + run scan-build-$VERSION -o scan-build clang-$VERSION -c ${BATS_TMPDIR}/scan_build_test.c + assert_output -p "1 bug found" +} -echo '{ +@test "scan-build --exclude functionality" { + + echo ' + void test() { + int x; + x = 1; // warn + } + '> ${BATS_TMPDIR}/scan_build_test.c + + run scan-build-$VERSION --exclude ${BATS_TMPDIR} -v clang-$VERSION -c ${BATS_TMPDIR}/scan_build_test.c + assert_success + assert_output -p 'scan-build: 0 bugs found.' +} + +@test "Check clang-tidy detection" { + echo 'namespace mozilla { namespace dom { void foo(); }}' > foo.cpp + run clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' foo.cpp -extra-arg=-std=c++17 + assert_output -p "nested namespaces can" +} + +@test "Check clang-tidy autofix" { + echo 'namespace mozilla { namespace dom { void foo(); } }' > foo.cpp + clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' foo.cpp -extra-arg=-std=c++17 -fix + run grep -q "namespace mozilla::dom" foo.cpp + assert_success +} + +@test "Check clangd output" { + echo '{ "jsonrpc": "2.0", "id": 0, "method": "initialize", @@ -173,521 +235,759 @@ "jsonrpc": "2.0", "method": "exit" } -' > a.json + ' > clangd.json + + run clangd-$VERSION -lit-test -pch-storage=memory < clangd.json + assert_success + assert_output -p 'func_with_args(${1:int a}, ${2:int b})' +} -clangd-$VERSION -lit-test -pch-storage=memory < a.json &> foo.log -if ! grep -q '"insertText": "func_with_args(${1:int a}, ${2:int b})",' foo.log; then - echo "clangd didn't export what we were expecting" - cat foo.log - exit 1 -fi - -echo 'namespace mozilla { -namespace dom { -void foo(); +@test "Test LLI and LLVM runtime functionality" { + local temp_dir="${BATS_TMPDIR}/lli_test" + mkdir -p "${temp_dir}" -int fonction_avec_args(int a, float b); + cat > "${temp_dir}/foo.c" < int main() { -fonction_avec_args + printf("lli foo"); + return 0; } +EOF + + # Generate LLVM IR + run clang-$VERSION -S -emit-llvm "${temp_dir}/foo.c" -o "${temp_dir}/foo.ll" + assert_success "Failed to generate LLVM IR" + + # Compile LLVM IR to assembly + run llc-$VERSION "${temp_dir}/foo.ll" -o "${temp_dir}/foo.s" + assert_success "Failed to compile LLVM IR to assembly" + + # Execute the LLVM IR using lli + run lli-$VERSION "${temp_dir}/foo.ll" + assert_output -p "lli foo" "LLI did not produce the expected output" + + # Optimize the LLVM IR + run opt-$VERSION -S -O3 "${temp_dir}/foo.ll" -o "${temp_dir}/opt.ll" + assert_success "Failed to optimize LLVM IR" + + # Execute the optimized LLVM IR + run lli-$VERSION "${temp_dir}/opt.ll" + assert_output -p "lli foo" "LLI did not produce the expected output after optimization" + + # Generate LLVM bitcode + run clang-$VERSION -O3 -emit-llvm "${temp_dir}/foo.c" -c -o "${temp_dir}/foo.bc" + assert_success "Failed to generate LLVM bitcode" + + # Make the bitcode executable + chmod +x "${temp_dir}/foo.bc" + + # Check if binfmt is enabled for LLVM bitcode + if grep -q "enabled" /proc/sys/fs/binfmt_misc/llvm-${VERSION}-runtime.binfmt; then + # Execute the bitcode + run "${temp_dir}/foo.bc" + assert_output -p "lli foo" "Execution of LLVM bitcode failed" + else + skip "binfmt_misc for LLVM bitcode is not enabled" + fi + rm -rf "${temp_dir}" } + +@test "Verify lld linker output (Bug 40659)" { + echo "int foo(void) { return 0; }"> "${BATS_TMPDIR}/foo.c" + echo "int foo(void); int main() {foo(); return 0;}"> "${BATS_TMPDIR}/main.c" + + run clang-$VERSION -fuse-ld=lld -O2 "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" -o foo + run ./foo + assert_success + + run clang-$VERSION -fuse-ld=lld-$VERSION -O2 "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" -o foo + assert_success + run ./foo + assert_success } -' > foo.cpp -content=$(sed ':a;N;$!ba;s/\n/\\n/g' foo.cpp) -echo '{ - "jsonrpc": "2.0", - "id": 0, - "method": "initialize", - "params": { - "capabilities": { - "textDocument": { - "completion": { - "completionItem": { - "snippetSupport": true - } - } - } - }, - "trace": "off" - } + + + +@test "Test LLVM coverage tools" { + echo '#include + int main() { printf("Coverage test"); return 0; }' > foo.c + run clang-$VERSION --coverage foo.c -o foo + assert_success + run ./foo + assert_success + run test -f foo-foo.gcno + assert_success } ---- + + +@test "Test clang c++ standard library functionality" { + echo '#include + #include + #include + using namespace std; + int main() { + vector tab; + tab.push_back("Hello"); + return 0; + }' > "${BATS_TMPDIR}/test.cpp" + + run clang++-$VERSION "${BATS_TMPDIR}/test.cpp" -o "${BATS_TMPDIR}/test" + assert_success + + run "${BATS_TMPDIR}/test" + assert_success +} + +@test "Test OpenMP support" { + echo '#include "omp.h" + #include + int main(void) { + #pragma omp parallel + printf("thread %d\n", omp_get_thread_num()); + return 0; + }' > "${BATS_TMPDIR}/omp_test.c" + + run clang-$VERSION "${BATS_TMPDIR}/omp_test.c" -fopenmp -o "${BATS_TMPDIR}/omp_test" + assert_success + + run "${BATS_TMPDIR}/omp_test" + assert_success +} + +@test "Test address sanitizer" { + echo '#include + int main() { + char *x = (char*)malloc(10 * sizeof(char*)); + free(x); + return x[5]; + }' > "${BATS_TMPDIR}/asan_test.c" + + run clang-$VERSION -o "${BATS_TMPDIR}/asan_test" -fsanitize=address -O1 -fno-omit-frame-pointer -g "${BATS_TMPDIR}/asan_test.c" + assert_success + + run "${BATS_TMPDIR}/asan_test" + assert_failure + assert_output -p "heap-use-after-free" +} + +@test "Test Address Sanitizer verbose mode" { + echo 'int main(int argc, char **argv) { + int *array = new int[100]; + delete [] array; + return array[argc]; // BOOM + }' > "${BATS_TMPDIR}/asan_test.cpp" + + # Compile the program with AddressSanitizer enabled + run clang++-$VERSION -O1 -g -fsanitize=address -fno-omit-frame-pointer "${BATS_TMPDIR}/asan_test.cpp" -o "${BATS_TMPDIR}/asan_test" + assert_success "ASan compilation failed" + + # Run the program with ASan verbose mode enabled + ASAN_OPTIONS=verbosity=1 ${BATS_TMPDIR}/asan_test &> foo.log || true + run cat foo.log + assert_output -p "Init done" + +} +@test "Test all sanitizers and multiarch compatibility" { + local temp_dir="${BATS_TMPDIR}/sanitizer_multi" + mkdir -p "${temp_dir}" + + # Generate the C test file + cat > "${temp_dir}/test.c" < +#include +int main () { - "jsonrpc": "2.0", - "method": "textDocument/didOpen", - "params": { - "textDocument": { - "uri": "file:///'$(pwd)'/cmaketest/foo.cpp", - "languageId": "cpp", - "version": 1, - "text": "'$content'" - } +#if __has_feature(address_sanitizer) + puts("address_sanitizer"); +#endif +#if __has_feature(thread_sanitizer) + puts("thread_sanitizer"); +#endif +#if __has_feature(memory_sanitizer) + puts("memory_sanitizer"); +#endif +#if __has_feature(undefined_sanitizer) + puts("undefined_sanitizer"); +#endif +#if __has_feature(dataflow_sanitizer) + puts("dataflow_sanitizer"); +#endif +#if __has_feature(efficiency_sanitizer) + puts("efficiency_sanitizer"); +#endif + printf("Ok\n"); + return EXIT_SUCCESS; +} +EOF + + # Check for compiler-rt library + run clang-$VERSION --target=x86_64-unknown-linux-gnu --rtlib=compiler-rt --print-libgcc-file-name + assert_success "Failed to locate compiler-rt runtime library" + + # Multiarch compatibility testing + # only for AMD64 for now + # many sanitizers only work on AMD64 + # x32 programs need to be enabled in the kernel bootparams for debian + # (https://wiki.debian.org/X32Port) + # + # SYSTEM should iterate multiple targets (eg. x86_64-unknown-none-gnu for embedded) + # MARCH should iterate the library architectures via flags + # LIB should iterate the different libraries + echo "if it fails, please run" + echo "apt-get install libc6-dev:i386 libgcc-5-dev:i386 libc6-dev-x32 libx32gcc-5-dev libx32gcc-9-dev" + local architectures=("-m64") # "-m32" "-mx32") + local sanitizers=("--rtlib=compiler-rt" "-fsanitize=address" "-fsanitize=thread" "-fsanitize=memory" "-fsanitize=undefined" "-fsanitize=dataflow") + + for arch in "${architectures[@]}"; do + for sanitizer in "${sanitizers[@]}"; do + # Skip unsupported combinations + if [[ "$arch" == "-m32" || "$arch" == "-mx32" ]]; then + if [[ "$sanitizer" == "-fsanitize=thread" || "$sanitizer" == "-fsanitize=memory" || "$sanitizer" == "-fsanitize=dataflow" ]]; then + continue + fi + fi + + echo "Testing sanitizer: $sanitizer with architecture: $arch" + rm -f "${temp_dir}/test" + run clang-$VERSION $arch $sanitizer -o "${temp_dir}/test" "${temp_dir}/test.c" + assert_success "Compilation failed for sanitizer: $sanitizer with architecture: $arch" + + if [ -f "${temp_dir}/test" ]; then + run "${temp_dir}/test" + assert_success "Execution failed for sanitizer: $sanitizer with architecture: $arch" + fi + done + done + + rm -rf "${temp_dir}" +} + +@test "Test LLVM symbolizer integration with AddressSanitizer" { + echo 'int main(int argc, char **argv) { + int *array = new int[100]; + delete [] array; + return array[argc]; // BOOM + }' > "${BATS_TMPDIR}/symbolizer_test.cpp" + + # Compile the program with AddressSanitizer enabled + run clang++-$VERSION -O1 -g -fsanitize=address -fno-omit-frame-pointer "${BATS_TMPDIR}/symbolizer_test.cpp" -o "${BATS_TMPDIR}/symbolizer_test" + assert_success "ASan compilation failed" + + # Run the program with external symbolizer path and verbose mode enabled + ASAN_OPTIONS=verbosity=2:external_symbolizer_path=/usr/lib/llvm-$VERSION/bin/llvm-symbolizer \ + run "${BATS_TMPDIR}/symbolizer_test" + assert_failure + + assert_output -p 'new[](unsigned' + + assert_output -p "symbolizer_test.cpp:4" + + # Run again without verbose mode and check symbolization + run "${BATS_TMPDIR}/symbolizer_test" + assert_output -p "new[](unsigned" + assert_output -p "symbolizer_test.cpp:4" +} + + +@test "Test libc++ with AddressSanitizer" { + echo '#include + int main() { + std::logic_error(""); + }' > "${BATS_TMPDIR}/sanitizer_test.cpp" + + # Compile with libc++ and AddressSanitizer + run clang++-$VERSION -stdlib=libc++ -fsanitize=address "${BATS_TMPDIR}/sanitizer_test.cpp" -o "${BATS_TMPDIR}/sanitizer_test" + assert_success "Compilation with libc++ and AddressSanitizer failed" + + # Run the compiled binary + run "${BATS_TMPDIR}/sanitizer_test" + assert_success "Running the binary failed with AddressSanitizer enabled" +} + +@test "Test AddressSanitizer with C standard library (Bug 876973)" { + + cat > "${BATS_TMPDIR}/asan_c_test.c" < +int main(int argc, char **argv) { + printf("Hello world!\\n"); + return 0; +} +EOF + + run clang-$VERSION -fsanitize=address "${BATS_TMPDIR}/asan_c_test.c" -o "${BATS_TMPDIR}/asan_c_test" -lc + assert_success "ASan compilation with -lc failed" + + run "${BATS_TMPDIR}/asan_c_test" &> /dev/null + assert_success "Execution failed or AddressSanitizer detected an issue with -lc" +} + +@test "Test Thread Sanitizer" { + skip_if_arch "i386" + + echo '#include + int Global; + void *Thread1(void *x) { + Global++; + return NULL; + } + void *Thread2(void *x) { + Global--; + return NULL; } + int main() { + pthread_t t[2]; + pthread_create(&t[0], NULL, Thread1, NULL); + pthread_create(&t[1], NULL, Thread2, NULL); + pthread_join(t[0], NULL); + pthread_join(t[1], NULL); + }' > "${BATS_TMPDIR}/tsan_test.c" + + run clang-$VERSION -o "${BATS_TMPDIR}/tsan_test" -fsanitize=thread -g -O1 "${BATS_TMPDIR}/tsan_test.c" + assert_success + + run "${BATS_TMPDIR}/tsan_test" + assert_failure + assert_output -p "data race" +} + +@test "Test AddressSanitizer and Undefined Behavior Sanitizer with complex C++ code" { + # Create the C++ source file + cat > "${BATS_TMPDIR}/asan_ubsan_test.cpp" < using b = a; +struct f { + template using e = b; +}; +struct g { + typedef f::e c; +}; +class h { + struct : g::c { int i; }; +}; +struct m { + h i; +}; +template void __attribute__((noreturn)) j(); +void k() { + m l; + j(); } ---- -{ - "jsonrpc": "2.0", - "id": 1, - "method": "textDocument/completion", - "params": { - "textDocument": { - "uri": "file:///'$(pwd)'/cmaketest/foo.cpp" - }, - "position": { - "line": 6, - "character": 18 - } +EOF + + # Compile the C++ code with AddressSanitizer and Undefined Behavior Sanitizer enabled + run clang++-$VERSION -std=c++14 -O3 -fsanitize=address -fsanitize=undefined -c "${BATS_TMPDIR}/asan_ubsan_test.cpp" -fno-crash-diagnostics + assert_success "Compilation with AddressSanitizer and Undefined Behavior Sanitizer failed" +} + + +# ===================== polly + +@test "Test Polly optimizations" { + echo '#define N 512 + float A[N][N], B[N][N], C[N][N]; + void init_arrays() { + for (int i = 0; i < N; i++) + for (int j = 0; j < N; j++) { + A[i][j] = 1.0; + B[i][j] = 2.0; + } } + int main() { + init_arrays(); + for (int i = 0; i < N; i++) + for (int j = 0; j < N; j++) + for (int k = 0; k < N; k++) + C[i][j] += A[i][k] * B[k][j]; + return 0; + }' > "${BATS_TMPDIR}/polly_test.c" + + # Compile with Polly optimizations enabled + run clang-$VERSION -O3 -mllvm -polly -mllvm -polly-vectorizer=stripmine "${BATS_TMPDIR}/polly_test.c" -o "${BATS_TMPDIR}/polly_test" + assert_success "Polly optimization failed" + + # Verify the optimization record + run clang-$VERSION -S -fsave-optimization-record -emit-llvm "${BATS_TMPDIR}/polly_test.c" -o "${BATS_TMPDIR}/polly_test.s" + assert_success "Failed to generate Polly optimization record" + + # broken https://bugs.llvm.org/show_bug.cgi?id=51642 + # run test -s "${BATS_TMPDIR}/polly_test.opt.yaml" + + run clang-$VERSION -S -O2 -fsave-optimization-record -emit-llvm "${BATS_TMPDIR}/polly_test.c" -o "${BATS_TMPDIR}/polly_test.s" + assert_success + run test -s "${BATS_TMPDIR}/polly_test.opt.yaml" + assert_success + run opt-$VERSION -S -polly-canonicalize "${BATS_TMPDIR}/polly_test.s" > "${BATS_TMPDIR}/polly_test.ll" + assert_success + run opt-$VERSION -basic-aa -polly-ast "${BATS_TMPDIR}/polly_test.ll" -polly-process-unprofitable + assert_success + # help with the path + cp "${BATS_TMPDIR}/polly_test.c" . + run /usr/lib/llvm-$VERSION/share/opt-viewer/opt-viewer.py -source-dir ${BATS_TMPDIR}/ ${BATS_TMPDIR}/polly_test.opt.yaml -o ${BATS_TMPDIR}/output > /dev/null + assert_success + + run grep -q "inlined into" ${BATS_TMPDIR}/output/*polly_test.c.html + assert_success +} + +@test "Test libpolly package presence" { + run test -f "/usr/lib/llvm-$VERSION/include/polly/LinkAllPasses.h" + assert_success } ---- -{ - "jsonrpc": "2.0", - "id": 4, - "method": "shutdown" + +# ===================== lldb + +@test "Test LLDB debugger functionality" { + echo '#include + int main() { + printf("LLDB test\n"); + return 0; + }' > "${BATS_TMPDIR}/lldb_test.c" + + run clang-$VERSION -g -o "${BATS_TMPDIR}/lldb_test" "${BATS_TMPDIR}/lldb_test.c" + assert_success + + echo "b main + run + bt + quit" > "${BATS_TMPDIR}/lldb_commands.txt" + + run lldb-$VERSION -s "${BATS_TMPDIR}/lldb_commands.txt" "${BATS_TMPDIR}/lldb_test" + assert_success } ---- -{ - "jsonrpc": "2.0", - "method": "exit" + + +@test "Test LLDB debugging with libc++" { + # Create the C++ source file + cat > "${BATS_TMPDIR}/foo.cpp" < +int main (void) { + std::vector a; + a.push_back(0); } -' > a.json +EOF + + # Compile the program with debugging symbols + run clang++-$VERSION -g -o "${BATS_TMPDIR}/foo32" "${BATS_TMPDIR}/foo.cpp" + assert_success "Compilation with debugging symbols failed" + + # Create the LLDB command script + echo "b main +r +n +p a +quit +" > "${BATS_TMPDIR}/lldb_commands.txt" + + run lldb-$VERSION -s "${BATS_TMPDIR}/lldb_commands.txt" "${BATS_TMPDIR}/foo32" + assert_output -p "stop reason = step over" +} + +# ===================== cmake + +@test "Test CMake integration (Bug 900440)" { + mkdir -p "${BATS_TMPDIR}/cmake_test" + + cat > "${BATS_TMPDIR}/cmake_test/CMakeLists.txt" < cmaketest/CMakeLists.txt < "${cmake_test_dir}/CMakeLists.txt" < /dev/null -# TODO this test is useless as it doesn't leverage foo.cpp or the compiledb -clangd-$VERSION -lit-test -pch-storage=memory < a.json &> foo.log -if ! grep -q '"insertText": "fonction_avec_args(${1:int a}, ${2:float b})",' foo.log; then - echo "clangd didn't export what we were expecting" - cat foo.log - exit 1 -fi -cd - &> /dev/null -rm -rf cmaketest - - -echo "Testing clang-$VERSION ..." - -rm -f foo.log -echo 'int main() {return 0;}' > foo.c -clang-$VERSION foo.c -echo '#include -int main() { -printf("lli foo"); -return 0; -}' > foo.c -clang-$VERSION -S -emit-llvm foo.c -llc-$VERSION foo.ll -if ! lli-$VERSION foo.ll|grep -q "lli foo"; then - echo "Not lli correct output" - lli-$VERSION foo.ll - exit 1 -fi -opt-$VERSION -S -O3 foo.ll -o opt.ll -if ! lli-$VERSION opt.ll|grep -q "lli foo"; then - echo "Not lli correct output after opt" - lli-$VERSION opt.ll - exit 1 -fi - -clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc -chmod +x foo.bc -# only run if the binfmt is installed correctly -if grep -q "enabled" /proc/sys/fs/binfmt_misc/llvm-${VERSION}-runtime.binfmt; then - if ! ./foo.bc|grep -q "lli foo"; then - echo "executing ./foo.bc failed" - ./foo.bc || true - #exit 1 - fi + mkdir -p "${cmake_test_dir}/standard" + mkdir -p "${cmake_test_dir}/explicit" - clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc - chmod +x foo.bc - if ! ./foo.bc|grep -q "lli foo"; then - echo "executing ./foo.bc failed" - ./foo.bc || true - #exit 1 + # Test: CMake find LLVM and Clang in the default path + pushd "${cmake_test_dir}/standard" > /dev/null + run cmake .. + assert_success "CMake integration test for default path failed" + popd > /dev/null + + # Test: CMake find LLVM and Clang in the explicit prefix path + pushd "${cmake_test_dir}/explicit" > /dev/null + run cmake -DCMAKE_PREFIX_PATH="/usr/lib/llvm-${VERSION}" .. + assert_success "CMake integration test for explicit path failed" + popd > /dev/null + + rm -rf "${cmake_test_dir}" +} + +@test "Test CMake lib detection with LLVM and Clang" { + # # https://reviews.llvm.org/D107799#3027607 + if ! dpkg -l | grep -q zlib1g-dev; then + skip "zlib1g-dev is not installed" fi -fi # binfmt test -if ! llvm-dis-$VERSION < foo.bc|grep -q "lli foo"; then - echo "llvm assembly code failed" - llvm-dis-$VERSION < foo.bc - exit 1 -fi - -# test if this is built with CURL -llvm-debuginfod-find-$VERSION --executable=1 5d016364c1cb69dd &> foo.log || true -if grep -q "No working HTTP" foo.log; then - echo "llvm-debuginfod-find isn't built with curl support" - exit 1 -fi - -echo '#include ' > foo.c -clang-$VERSION -c foo.c - -# https://bugs.launchpad.net/bugs/1810860 -clang-$VERSION -dumpversion &> foo.log -if grep -q 4.2.1 foo.log; then - echo "dumpversion still returns 4.2.1" - echo "it should return the clang version" - cat foo.log - exit 1 -fi + local cmake_test_dir="${BATS_TMPDIR}/cmaketest" + mkdir -p "${cmake_test_dir}" -# bug 903709 -echo '#include -void increment(atomic_size_t *arg) { - atomic_fetch_add(arg, 1); -} ' > foo.c + cat > "${cmake_test_dir}/CMakeLists.txt" < /dev/null + mkdir -p "${cmake_test_dir}/foo" + pushd "${cmake_test_dir}/foo" > /dev/null -echo "#include " > foo.cc -NBLINES=$(clang++-$VERSION -P -E foo.cc|grep .|wc -l) -if test $NBLINES -lt 60; then - echo "Error: more than 60 non-empty lines should be returned" - echo "output:" - clang++-$VERSION -P -E foo.cc - exit 42 -fi - -if [ $DEB_HOST_ARCH == "amd64" -o $DEB_HOST_ARCH == "i386" ]; then - # Fails on arm64 with - # /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? - echo '#include ' > foo.cc - clang++-$VERSION -c foo.cc -fi + # Run CMake and capture the output + run cmake -DCMAKE_C_COMPILER=clang-$VERSION -DCMAKE_CXX_COMPILER=clang++-$VERSION .. + assert_success "CMake failed to run with ZLIB detection" -# Bug 913213 -echo '#include ' | clang-$VERSION -E - > /dev/null + # Ensure ZLIB is detected successfully + refute_output -p "Could NOT find ZLIB" "CMake could not find ZLIB even though zlib1g-dev is installed" -# Bug launchpad #1488254 -echo ' -#include -std::string hello = "Hello, world!\n"; -' > foo.cc + popd > /dev/null + rm -rf "${cmake_test_dir}" +} +@test "Test CMake Clang detection (Bug 994827)" { + local cmake_test_dir="${BATS_TMPDIR}/cmaketest" + mkdir -p "${cmake_test_dir}" -echo ' -#include -#include -extern std::string hello; -int main() { - std::cout << hello; - return 0; -} ' > bar.cc + cat > "${cmake_test_dir}/CMakeLists.txt" < /dev/null || true -clang++-$VERSION -c foo.cc && clang++-$VERSION foo.o bar.cc && ./a.out > /dev/null -g++ -c foo.cc && clang++-$VERSION foo.o bar.cc && ./a.out > /dev/null || true -clang++-$VERSION -c foo.cc -fPIC && g++ foo.o bar.cc && ./a.out > /dev/null || true +find_package(Clang REQUIRED CONFIG HINTS "/usr/lib/llvm-${VERSION}/lib/cmake/clang/") +EOF -## test z3 -echo ' -void clang_analyzer_eval(int); -void testBitwiseRules(unsigned int a, int b) { - clang_analyzer_eval((1 & a) <= 1); // expected-warning{{TRUE}} - // with -analyzer-constraints=z3, it can tell that it is FALSE - // without the option, it is unknown - clang_analyzer_eval((b | -2) >= 0); // expected-warning{{FALSE}} + mkdir -p "${cmake_test_dir}/foo" + pushd "${cmake_test_dir}/foo" > /dev/null + + # Run CMake and check for success + run cmake .. + assert_success "CMake failed to detect Clang with the specified HINTS path" + + popd > /dev/null + rm -rf "${cmake_test_dir}" } -' > foo.c -clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 foo.c &> foo.log || true -if ! grep -q "error: analyzer constraint manager 'z3' is only available if LLVM was built with -DLLVM_ENABLE_Z3_SOLVER=ON" foo.log; then - # Should work - clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config eagerly-assume=false -analyzer-constraints=z3 foo.c - clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 foo.c &> foo.log - if ! grep -q "2 warnings generated." foo.log; then - echo "Should find 2 warnings" - exit 1 +# ===================== libc++ + +@test "Test libc++ and libc++abi integration" { + echo '#include + #include + #include + int main() { + std::vector v; + v.push_back("test"); + return 0; + }' > "${BATS_TMPDIR}/libcxx_test.cpp" + + run clang++-$VERSION -stdlib=libc++ -lc++abi "${BATS_TMPDIR}/libcxx_test.cpp" -o "${BATS_TMPDIR}/libcxx_test" + assert_success + + run "${BATS_TMPDIR}/libcxx_test" + assert_success +} + +skip_if_arch() { + if [ "$DEB_HOST_ARCH" = "$1" ]; then + skip "Test not supported on $1 architecture" fi -else - echo "z3 support not available" -fi - -# Should fail -clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config eagerly-assume=false foo.c &> foo.log || true -if grep -q "File a.c Line 7: UNKNOWN" foo.log; then - echo "Should fail without -analyzer-constraints=z3" - exit 1 -fi - -clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection foo.c &> foo.log -if ! grep -q "warnings generated." foo.log; then - echo "Should find at least 2 warnings" - exit 1 -fi +} -# bug 827866 -echo 'bool testAndSet(void *atomic) { - return __atomic_test_and_set(atomic, __ATOMIC_SEQ_CST); -}'> foo.cpp -clang++-$VERSION -c -target aarch64-linux-gnu foo.cpp -if ! file foo.o 2>&1 | grep -i -q "aarch64"; then - echo "Could not find the string 'aarch64' in the output of file. Output:" - file foo.o - exit 42 -fi - -clang-$VERSION --target=arm-linux-gnueabihf -dM -E -xc - < /dev/null &> foo.log -if ! grep -q "#define __ARM_ARCH 7" foo.log; then - # bug 930008 - echo "The target arch for arm should be v7" - cat foo.log - exit 42 -fi +# ===================== wasm -echo ' -#include -int -main () -{ - (void) strcat; - return 0; -}' > foo.c -clang-$VERSION -c foo.c +@test "Test WASM support for C program with wasi-libc" { + if ! dpkg -l | grep -q wasi-libc; then + skip "wasi-libc not installed" + fi + + # Test C program compilation for WASM + echo '#include + int main(int argc, char *argv[]) { + printf("%s\n", "Hello World!"); + }' > "${BATS_TMPDIR}/wasm_printf_test.c" + + # Compile with clang targeting wasm32-wasi + run clang-$VERSION -target wasm32-wasi -o "${BATS_TMPDIR}/wasm_printf" "${BATS_TMPDIR}/wasm_printf_test.c" + assert_success "Failed to compile printf.c for wasm32-wasi" + + # Check the output binary is a WebAssembly file + run file "${BATS_TMPDIR}/wasm_printf" + assert_output -p "WebAssembly" + + # Clean up + rm -f "${BATS_TMPDIR}/wasm_printf_test.c" "${BATS_TMPDIR}/wasm_printf" +} -echo '#include -int main() {} ' > foo.c -clang-$VERSION foo.c - -echo '#include -int main() { }' > foo.cpp -clang++-$VERSION -std=c++11 foo.cpp - -echo "Testing linking clang-cpp ..." - -clang-$VERSION -lclang-cpp$VERSION -v foo.cpp -o o &> /dev/null || true -if ! ldd o 2>&1|grep -q libclang-cpp; then - echo "Didn't link against libclang-cpp$VERSION" - exit 42 -fi -./o > /dev/null - -check_symlink() { - P="/usr/lib/llvm-$VERSION/lib/$1" - if test ! -e $P; then - echo "invalid symlink $P" - ls -al $P - exit 1 +@test "Test WASM support for C++ program with wasi-libc" { + if ! dpkg -l | grep -q wasi-libc; then + skip "wasi-libc not installed" fi + + # Test C++ program compilation for WASM + echo '#include + int main() { + std::cout << "Hello World!" << std::endl; + }' > "${BATS_TMPDIR}/wasm_cout_test.cpp" + + # Compile with clang++ targeting wasm32-wasi + run clang++-$VERSION --target=wasm32-wasi -o "${BATS_TMPDIR}/wasm_cout" "${BATS_TMPDIR}/wasm_cout_test.cpp" + assert_success "Failed to compile cout.cpp for wasm32-wasi" + + # Check the output binary is a WebAssembly file + run file "${BATS_TMPDIR}/wasm_cout" + assert_output -p "WebAssembly" + + # Clean up + rm -f "${BATS_TMPDIR}/wasm_cout_test.cpp" "${BATS_TMPDIR}/wasm_cout" } -# check_symlink "libclang-cpp.so.$VERSION" why is that one needed? -check_symlink "libclang-$VERSION.so" -check_symlink "libclang.so" - -if [ $DEB_HOST_ARCH != "i386" ]; then - echo "Testing python clang ..." - python3 -c 'from ctypes import *; import clang.cindex; config = clang.cindex.Config(); verfunc = config.lib.clang_getClangVersion; verfunc.restype = c_char_p ; print(verfunc())' -fi +# ===================== sanitizers -echo "Testing code coverage ..." +@test "Test Memory sanitizer" { + skip_if_arch "i386" -echo '#include -int main() { -if (1==1) { - printf("true"); -}else{ - printf("false"); - return 42; -} -return 0;}' > foo.c -clang-$VERSION --coverage foo.c -o foo -./foo > /dev/null -if test ! -f foo.gcno; then - echo "Coverage failed"; -fi - -echo "#include " > foo.cpp -clang++-$VERSION -c foo.cpp - -echo "Testing linking ..." -if test ! -f /usr/lib/llvm-$VERSION/bin/../lib/LLVMgold.so; then - echo "Install llvm-$VERSION-dev" - exit 1 -fi + echo '#include + int main() { + int *a = (int*)malloc(sizeof(int)); + int b = *a; // Use uninitialized value + free(a); + return b; + }' > "${BATS_TMPDIR}/msan_test.c" -echo '#include -int main() { -if (1==1) { - printf("true"); -}else{ - printf("false"); - return 42; -} -return 0;}' > foo.c -rm foo bar.cc - -clang-$VERSION -flto foo.c -opaque-pointers -o foo -./foo > /dev/null - -clang-$VERSION -fuse-ld=gold foo.c -o foo -./foo > /dev/null - -# test thinlto -echo "int foo(void) { return 0; }"> foo.c -echo "int foo(void); int main() {foo(); return 0;}">main.c -clang-$VERSION -flto=thin -O2 foo.c main.c -o foo -./foo > /dev/null -clang-$VERSION -flto=thin -O2 foo.c main.c -c - -# understand LTO files -# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919020 -clang-$VERSION foo.c -flto -c -file foo.o|grep -q "LLVM IR bitcode" -if ! llvm-nm-$VERSION foo.o|grep -q "T foo"; then - echo "gold linker isn't understood" - exit 1 -fi - -echo "Testing lld-$VERSION ..." - -if test ! -f /usr/bin/lld-$VERSION; then - echo "Install lld-$VERSION" - exit 1 -fi -clang-$VERSION -fuse-ld=lld -O2 foo.c main.c -o foo -./foo > /dev/null - -if ls -al1 /usr/bin/ld.lld|grep -q ld.lld-$VERSION; then -# https://bugs.llvm.org/show_bug.cgi?id=40659 -# -fuse-ld=lld will call lld -# Mismatch of version can fail the check -# so, only run it when /usr/bin/lld == $VERSION - clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo - ./foo > /dev/null -fi - -clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo -./foo > /dev/null - -# Bug 916975 -file foo &> foo.log -if ! grep -q "BuildID" foo.log; then - echo "BuildID isn't part of the generated binary (lld generation)" - exit 1 -fi -# Bug 916975 -clang-$VERSION -O2 foo.c main.c -o foo2 -file foo2 &> foo2.log -if ! grep -q "BuildID" foo2.log; then - echo "BuildID isn't part of the generated binary (ld generation)" - exit 1 -fi - -strip foo2 -file foo2 &> foo2.log -if ! grep -q "BuildID" foo2.log; then - echo "BuildID isn't part of the generated binary (stripped)" - exit 1 -fi -rm foo2 foo2.log - -if test ! -f /usr/lib/llvm-$VERSION/bin/llvm-symbolizer; then - echo "Install llvm-$VERSION" - exit 1 -fi - -echo "vzeroupper" | llvm-exegesis-$VERSION -mode=uops -snippets-file=- &> foo.log || true -if grep -q -E "(built without libpfm|cannot initialize libpfm)" foo.log; then - echo "could not run llvm-exegesis correctly" - cat foo.log|head - exit 42 -fi - -if test ! -f /usr/lib/llvm-$VERSION/lib/libFuzzer.a; then - echo "Install libfuzzer-$VERSION-dev"; - exit -1; -fi + run clang-$VERSION -fsanitize=memory -o "${BATS_TMPDIR}/msan_test" "${BATS_TMPDIR}/msan_test.c" + assert_success +} -echo "Testing libfuzzer-$VERSION-dev ..." +@test "Test undefined behavior sanitizer" { + echo '#include + int main(int argc, char **argv) { + int k = 0x7fffffff; + k += argc; // potential overflow + return 0; + }' > "${BATS_TMPDIR}/ubsan_test.c" + + run clang-$VERSION -fsanitize=undefined -o "${BATS_TMPDIR}/ubsan_test" "${BATS_TMPDIR}/ubsan_test.c" + assert_success +} -cat << EOF > test_fuzzer.cc +@test "Test compiler-rt library presence" { + run clang-$VERSION --target=x86_64-unknown-linux-gnu --rtlib=compiler-rt --print-libgcc-file-name + assert_success + assert_output -p 'libclang_rt' +} + +# ===================== libfuzzer + +@test "Test libFuzzer presence" { + run test -f "/usr/lib/llvm-$VERSION/lib/libFuzzer.a" + assert_success +} +@test "Test libFuzzer compilation and execution across architectures" { + if [[ "$DEB_HOST_ARCH" != "amd64" && "$DEB_HOST_ARCH" != "i386" ]]; then + skip "Test not applicable on architectures other than amd64 or i386" + fi + + # Create a fuzzer test source file + cat > "${BATS_TMPDIR}/test_fuzzer.cc" < #include + extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - if (size > 0 && data[0] == 'H') - if (size > 1 && data[1] == 'I') - if (size > 2 && data[2] == '!') - __builtin_trap(); - return 0; + if (size > 0 && data[0] == 'H') { + if (size > 1 && data[1] == 'I') { + if (size > 2 && data[2] == '!') { + __builtin_trap(); + } + } + } + return 0; } - EOF -clang++-$VERSION -fsanitize=address -fsanitize-coverage=edge,trace-pc test_fuzzer.cc /usr/lib/llvm-$VERSION/lib/libFuzzer.a -if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then - echo "fuzzer failed" - exit 42 -fi - -clang++-$VERSION -fsanitize=address,fuzzer test_fuzzer.cc -if ! ./a.out 2>&1 | grep -q "libFuzzer: deadly signal"; then - echo "fuzzer failed" -fi - -echo 'int main(int argc, char **argv) { - int *array = new int[100]; - delete [] array; - return array[argc]; // BOOM -}' > foo.cpp -clang++-$VERSION -O1 -g -fsanitize=address -fno-omit-frame-pointer foo.cpp -ASAN_OPTIONS=verbosity=1 ./a.out &> foo.log || true -if ! grep -q "Init done" foo.log; then - echo "asan verbose mode failed" - cat foo.log - exit 42 -fi - -# See also https://bugs.llvm.org/show_bug.cgi?id=39514 why -# /usr/bin/llvm-symbolizer-7 doesn't work -ASAN_OPTIONS=verbosity=2:external_symbolizer_path=/usr/lib/llvm-$VERSION/bin/llvm-symbolizer ./a.out &> foo.log || true -if ! grep -q "Using llvm-symbolizer" foo.log; then - echo "could not find llvm-symbolizer path" - cat foo.log - exit 42 -fi -if ! grep -q "new\[\](unsigned" foo.log; then - echo "could not symbolize correctly" - cat foo.log - exit 42 -fi - -if ! grep -q "foo.cpp:3:3" foo.log; then - echo "could not symbolize correctly" - cat foo.log - exit 42 -fi -./a.out &> foo.log || true -if ! grep -q "new\[\](unsigned" foo.log; then - echo "could not symbolize correctly" - cat foo.log - exit 42 -fi - -if ! grep -q "foo.cpp:3:3" foo.log; then - echo "could not symbolize correctly" - cat foo.log - exit 42 -fi - -# Example from https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md -# coverage fuzzing -cat << EOF > StandaloneFuzzTargetMain.c + # Compile the test with libFuzzer + run clang-$VERSION -fsanitize=fuzzer "${BATS_TMPDIR}/test_fuzzer.cc" -o "${BATS_TMPDIR}/a.out" &> "${BATS_TMPDIR}/foo.log" + + # Check for missing file errors in the log + if grep -q "No such file or directory" "${BATS_TMPDIR}/foo.log"; then + skip "Fuzzer compilation failed due to missing files or incorrect libraries" + fi + + run "${BATS_TMPDIR}/a.out" + assert_output -e "(Test unit written|PreferSmall)" +} + +@test "Test libFuzzer functionality" { + if [[ "$DEB_HOST_ARCH" != "amd64" && "$DEB_HOST_ARCH" != "i386" ]]; then + skip "Test not applicable on architectures other than amd64 or i386" + fi + echo '#include + #include + extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + if (size > 0 && data[0] == '\''H'\'') + if (size > 1 && data[1] == '\''I'\'') + if (size > 2 && data[2] == '\''!'\'') + __builtin_trap(); + return 0; + }' > "${BATS_TMPDIR}/fuzzer_test.cc" + + # Compile with libFuzzer explicitly linked + run clang++-$VERSION -fsanitize=address,fuzzer "${BATS_TMPDIR}/fuzzer_test.cc" -o "${BATS_TMPDIR}/fuzzer_test" + assert_success "Fuzzer compilation failed" + + run "${BATS_TMPDIR}/fuzzer_test" + assert_failure + assert_output -p "libFuzzer: deadly signal" + + run clang++-$VERSION -fsanitize=address -fsanitize-coverage=edge,trace-pc "${BATS_TMPDIR}/fuzzer_test.cc" /usr/lib/llvm-$VERSION/lib/libFuzzer.a -o "${BATS_TMPDIR}/fuzzer_test_explicit" + assert_success "Fuzzer compilation with explicit linking failed" + run "${BATS_TMPDIR}/fuzzer_test_explicit" + assert_output -e "(Test unit written|PreferSmall)" +} + +@test "Test coverage Fuzzing with llvm-profdata and llvm-cov" { + # Create the main fuzzing driver + cat > "${BATS_TMPDIR}/StandaloneFuzzTargetMain.c" < #include #include @@ -716,7 +1016,8 @@ } EOF -cat << EOF > fuzz_me.cc + # Create the fuzzing target + cat > "${BATS_TMPDIR}/fuzz_me.cc" < #include @@ -733,222 +1034,202 @@ return 0; } EOF -clang-$VERSION -fprofile-instr-generate -fcoverage-mapping fuzz_me.cc StandaloneFuzzTargetMain.c -rm -rf CORPUS -mkdir -p CORPUS -echo -n A > CORPUS/A -./a.out CORPUS/* &> /dev/null -if ! ./a.out CORPUS/* 2>&1 | grep -q "running 1 inputs"; then - echo "Coverage fuzzing failed" - exit 1 -fi -llvm-profdata-$VERSION merge -sparse *.profraw -o default.profdata -llvm-cov-$VERSION show a.out -instr-profile=default.profdata -name=FuzzMe &> foo.log -if ! grep -q "return DataSize >= 3" foo.log; then - echo "llvm-cov didn't show the expected output in fuzzing" - exit 1 -fi -echo -n FUZA > CORPUS/FUZA && ./a.out CORPUS/* &> /dev/null -llvm-profdata-$VERSION merge -sparse *.profraw -o default.profdata -llvm-cov-$VERSION show a.out -instr-profile=default.profdata -name=FuzzMe &> foo.log -if ! grep -q "Data\[3\] == 'Z';" foo.log; then - echo "llvm-cov didn't show the expected output in fuzzing" - exit 1 -fi -rm -rf CORPUS fuzz_me.cc StandaloneFuzzTargetMain.c + # Compile the fuzzing target and driver with profiling and coverage mapping + run clang-$VERSION -fprofile-instr-generate -fcoverage-mapping \ + "${BATS_TMPDIR}/fuzz_me.cc" "${BATS_TMPDIR}/StandaloneFuzzTargetMain.c" \ + -o "${BATS_TMPDIR}/a.out" + assert_success "Fuzzer compilation failed" -echo "Testing sanitizers ..." + # Set up the corpus directory and create initial inputs + mkdir -p "${BATS_TMPDIR}/CORPUS" + echo -n A > "${BATS_TMPDIR}/CORPUS/A" -echo '#include -int main() { - char *x = (char*)malloc(10 * sizeof(char*)); - free(x); - return x[5]; -} -' > foo.c -clang-$VERSION -o foo -fsanitize=address -O1 -fno-omit-frame-pointer -g foo.c -if ! ./foo 2>&1 | grep -q heap-use-after-free ; then - echo "sanitize=address is failing" - exit 42 -fi + # Run the fuzzer binary with initial inputs + run "${BATS_TMPDIR}/a.out" "${BATS_TMPDIR}/CORPUS/*" + # fails on purpose + assert_failure + assert_output -p "running 1 inputs" -# Bug #876973 -echo ' -#include -int main(int argc, char **argv) -{ - printf("Hello world!\n"); - return 0; -}' > foo.c - -# segfaults on 32bit with "-lc" library (also 6.0 does segfault) -clang-$VERSION -fsanitize=address foo.c -o foo -lc -./foo &> /dev/null || true + # Merge profiling data + run llvm-profdata-$VERSION merge -sparse *.profraw -o "${BATS_TMPDIR}/default.profdata" + assert_success "Failed to merge profiling data" -echo ' -#include -#include + # Generate coverage report for the function `FuzzMe` + run llvm-cov-$VERSION show "${BATS_TMPDIR}/a.out" \ + -instr-profile="${BATS_TMPDIR}/default.profdata" \ + -name=FuzzMe + assert_success "llvm-cov failed to generate a coverage report" + assert_output -p 'DataSize >= 3' -int Global; + # Add another input to the corpus and rerun + echo -n FUZA > "${BATS_TMPDIR}/CORPUS/FUZA" + run "${BATS_TMPDIR}/a.out" "${BATS_TMPDIR}/CORPUS/*" + assert_failure + assert_output -p "running 1 inputs" -void *Thread1(void *x) { - Global++; - return NULL; + # Merge profiling data again + run llvm-profdata-$VERSION merge -sparse *.profraw -o "${BATS_TMPDIR}/default.profdata" + assert_success "Failed to merge profiling data after adding new inputs" + + # Generate coverage report again + run llvm-cov-$VERSION show "${BATS_TMPDIR}/a.out" \ + -instr-profile="${BATS_TMPDIR}/default.profdata" \ + -name=FuzzMe &> "${BATS_TMPDIR}/coverage.log" + assert_success "llvm-cov failed to generate a coverage report after new inputs" + assert_output -p "Data[3] == 'Z';" + + # Cleanup + rm -rf "${BATS_TMPDIR}/CORPUS" "${BATS_TMPDIR}/fuzz_me.cc" "${BATS_TMPDIR}/StandaloneFuzzTargetMain.c" *.profraw } -void *Thread2(void *x) { - Global--; - return NULL; +@test "Test BuildID in binaries for different linkers (Bug 916975)" { + + echo "int foo(void) { return 0; }"> "${BATS_TMPDIR}/foo.c" + echo "int foo(void); int main() {foo(); return 0;}"> "${BATS_TMPDIR}/main.c" + + # Case 1: Compile and link with LLD + run clang-$VERSION -fuse-ld=lld -O2 "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" -o "${BATS_TMPDIR}/foo_lld" + assert_success "Compilation and linking with LLD failed" + + # Check for BuildID in the LLD-linked binary + run file "${BATS_TMPDIR}/foo_lld" + assert_output -p "BuildID" "BuildID missing from binary generated with LLD" + + # Case 2: Compile and link with the specific LLD version + run clang-$VERSION -fuse-ld=lld-$VERSION -O2 "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" -o "${BATS_TMPDIR}/foo_lld_version" + assert_success "Compilation and linking with LLD-$VERSION failed" + + # Check for BuildID in the LLD-$VERSION-linked binary + run file "${BATS_TMPDIR}/foo_lld_version" + assert_output -p "BuildID" "BuildID missing from binary generated with LLD-$VERSION" + + # Case 3: Compile and link with default LD, then strip the binary + run clang-$VERSION -O2 "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" -o "${BATS_TMPDIR}/foo_ld" + assert_success "Compilation and linking with default LD failed" + + # Check for BuildID in the LD-linked binary + run file "${BATS_TMPDIR}/foo_ld" + assert_output -p "BuildID" "BuildID missing from binary generated with default LD" + + # Strip the binary and recheck for BuildID + run strip "${BATS_TMPDIR}/foo_ld" + assert_success "Stripping binary failed" + + run file "${BATS_TMPDIR}/foo_ld" + assert_output -p "BuildID" "BuildID missing from stripped binary" + + # Cleanup + rm -f "${BATS_TMPDIR}/foo.c" "${BATS_TMPDIR}/main.c" "${BATS_TMPDIR}/foo_lld" "${BATS_TMPDIR}/foo_lld_version" "${BATS_TMPDIR}/foo_ld" } -int main() { - pthread_t t[2]; - pthread_create(&t[0], NULL, Thread1, NULL); - pthread_create(&t[1], NULL, Thread2, NULL); - pthread_join(t[0], NULL); - pthread_join(t[1], NULL); -} ' > foo.c - -# fails on i386 with: clang: error: unsupported option '-fsanitize=thread' for target 'i686-pc-linux-gnu' -if [ $DEB_HOST_ARCH != "i386" ]; then - clang-$VERSION -o foo -fsanitize=thread -g -O1 foo.c - if ! strings ./foo 2>&1 | grep -q "tsan"; then - echo "binary doesn't contain tsan code" - strings foo - exit 42 - fi - if ! ./foo 2>&1 | grep -q "data race"; then - echo "sanitize=address is failing" - exit 42 - fi -fi +@test "Test optimization record generation" { + echo '#define N 1536 + float A[N][N]; + void test() { + for (int i = 0; i < N; i++) + for (int j = 0; j < N; j++) + A[i][j] = 0; + }' > "${BATS_TMPDIR}/opt_test.c" -echo ' -class a { -public: - ~a(); -}; -template using b = a; -struct f { - template using e = b; -}; -struct g { - typedef f::e c; -}; -class h { - struct : g::c { int i; }; -}; -struct m { - h i; -}; -template void __attribute__((noreturn)) j(); -void k() { - m l; - j(); -}' > foo.cpp -clang++-$VERSION -std=c++14 -O3 -fsanitize=address -fsanitize=undefined -c foo.cpp -fno-crash-diagnostics + run clang-$VERSION -S -O2 -fsave-optimization-record -emit-llvm "${BATS_TMPDIR}/opt_test.c" -o "${BATS_TMPDIR}/opt_test.s" + assert_success + run test -s "${BATS_TMPDIR}/opt_test.opt.yaml" + assert_success +} -# fails on 32 bit, seems a real BUG in the package, using 64bit static libs? -LANG=C clang-$VERSION -fsanitize=fuzzer test_fuzzer.cc &> foo.log || true -if ! grep "No such file or directory" foo.log; then - # This isn't failing on 64, so, look at the results - if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then - echo "fuzzer. Output:" - ./a.out || true - if [ $DEB_HOST_ARCH == "amd64" -o $DEB_HOST_ARCH == "i386" ]; then - # Don't fail on arm64 and ppc64el - exit 42 - fi - fi -fi +@test "Test LLVM tools - llvm-dis" { + echo 'int main() { return 42; }' > "${BATS_TMPDIR}/llvm_tools_test.c" -echo 'int main() { - int a=0; - return a; -} -' > foo.c -clang-$VERSION -g -o bar foo.c - -# ABI issue between gcc & clang with clang 7 -# https://bugs.llvm.org/show_bug.cgi?id=39427 -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913271 -if test $VERSION -eq 7; then -echo ' -#include -#include -namespace llvm { class Constant{}; class Type; class Value; } -extern llvm::Constant* bar (llvm::Type*, llvm::Constant*, llvm::ArrayRef, bool, llvm::Optional o, llvm::Type*); -#ifdef PART2 -llvm::Constant* bar (llvm::Type*, llvm::Constant*, llvm::ArrayRef, bool, llvm::Optional o, llvm::Type*) -{ - return o.hasValue()?static_cast(nullptr)+1:nullptr; + run clang-$VERSION -O3 -emit-llvm "${BATS_TMPDIR}/llvm_tools_test.c" -c -o "${BATS_TMPDIR}/llvm_tools_test.bc" + assert_success + + run llvm-dis-$VERSION < "${BATS_TMPDIR}/llvm_tools_test.bc" + assert_success + assert_output -p "42" } -#endif -#ifndef PART2 -static llvm::Constant* doConstantRef(llvm::Type* type, llvm::Constant* var, llvm::ArrayRef steps) -{ - llvm::Optional inRangeIndex; - return bar(type, var, steps, false, inRangeIndex, nullptr); + +@test "Test LLVM debuginfod-find" { + run llvm-debuginfod-find-$VERSION --executable=1 5d016364c1cb69dd + + # Check that it's not built without curl support + refute_output -p "No working HTTP" } -bool foo() -{ - llvm::Constant* var = nullptr; - llvm::Value* zero = nullptr; - llvm::Value* indexes[2] = {zero, zero}; - llvm::ArrayRef steps(indexes, 2); - auto result = doConstantRef(nullptr, var, steps); - return result; + +@test "Test libclang library versions" { + run test ! -f "/usr/lib/llvm-$VERSION/lib/libclang.so.1" + assert_success "/usr/lib/llvm-$VERSION/lib/libclang.so.1 found. - Break the build as it breaks the coinstalability" } -int main() -{ - return foo(); + +@test "Test clang-cpp linking" { + echo '#include + int main() { return 0; }' > "${BATS_TMPDIR}/cpp_link_test.cpp" + + run clang-$VERSION -lclang-cpp$VERSION "${BATS_TMPDIR}/cpp_link_test.cpp" -o "${BATS_TMPDIR}/cpp_link_test" + assert_success + + run ldd "${BATS_TMPDIR}/cpp_link_test" + assert_output -p "libclang-cpp" + run "${BATS_TMPDIR}/cpp_link_test" + assert_success } -#endif -' > foo.cpp -FLAGS="-I/usr/lib/llvm-$VERSION/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -ffunction-sections -fdata-sections -O2 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" -clang++-$VERSION -c -o part1.o foo.cpp $FLAGS -if test -f /usr/bin/g++; then - g++ -c -o part2.o -DPART2 foo.cpp $FLAGS - clang++-$VERSION -o foo part1.o part2.o $FLAGS - ./foo -fi -rm part1.o part2.o -fi - -# OpenMP -if dpkg -l libomp-$VERSION-dev >/dev/null 2>&1; then -cat < foo.c -//test.c -#include "omp.h" -#include +@test "Verify symbolic links for LLVM libraries" { + check_symlink() { + local symlink_path="/usr/lib/llvm-${VERSION}/lib/$1" -int main(void) { - #pragma omp parallel - printf("thread %d\n", omp_get_thread_num()); + # Check if the symlink exists + if [ ! -e "$symlink_path" ]; then + echo "Invalid symlink: $symlink_path" + ls -al "$symlink_path" 2>/dev/null || true + fail "Symbolic link validation failed for $1" + fi + } + + # Check required symlinks + check_symlink "libclang-cpp.so" + check_symlink "libclang-${VERSION}.so" + check_symlink "libclang.so" } -EOF -clang-$VERSION foo.c -fopenmp -o o -./o > /dev/null -else - echo "OpenMP check skipped, no libomp-$VERSION-dev available." -fi -if test ! -f /usr/lib/llvm-$VERSION/include/c++/v1/vector; then - echo "Install libc++-$VERSION-dev"; - exit -1; -fi +@test "Test Python Clang bindings" { + skip_if_arch "i386" + echo " +from ctypes import * +libclang='/usr/lib/llvm-$VERSION/lib/libclang-$VERSION.so.1' +lib = CDLL(libclang) +fun = lib.clang_getAddressSpace +print(fun) + " > foo.py -if test ! -f /usr/lib/llvm-$VERSION/lib/libc++abi.so; then - echo "Install libc++abi-$VERSION-dev"; - exit -1; -fi + run python3 foo.py + assert_output -p "_FuncPtr" +} +# ===================== libc++ + +@test "Test libc++ linking" { + echo '#include + int main() { std::vector v; v.push_back(1); return 0; }' > foo.cpp + run clang++-$VERSION -stdlib=libc++ foo.cpp -o foo + assert_success + run ./foo + assert_success +} -# libc++ -echo ' +@test "Test libc++abi linking" { + echo '#include + int main() { std::vector v; v.push_back(1); return 0; }' > foo.cpp + run clang++-$VERSION -stdlib=libc++ -lc++abi foo.cpp -o foo + assert_success + run ./foo + assert_success +} + +@test "Test libc++ compilation and linking" { + # Create the C++ source file + cat > "${BATS_TMPDIR}/libcxx_test.cpp" < #include #include @@ -964,95 +1245,90 @@ cout << *it << " "; } return 0; -}' > foo.cpp -clang++-$VERSION -stdlib=libc++ foo.cpp -o o -if ! ldd o 2>&1|grep -q libc++.so.1; then - echo "not linked against libc++.so.1" - exit -1 -fi -if ! ldd o 2>&1|grep -q libc++abi.so.1; then - echo "not linked against libc++abi.so.1" - exit -1 -fi - -./o > /dev/null -clang++-$VERSION -std=c++11 -stdlib=libc++ foo.cpp -o o -./o > /dev/null -clang++-$VERSION -std=c++14 -stdlib=libc++ foo.cpp -lc++experimental -o o -./o > /dev/null - -# Bug 46321 -cat > test.cpp << EOF -#include -int main() { - std::cout << "Hello World!" << std::endl; } EOF -clang++-$VERSION -stdlib=libc++ -unwindlib=libunwind -rtlib=compiler-rt -static-libstdc++ -static-libgcc test.cpp -lpthread -ldl -o test -./test > /dev/null -clang++-$VERSION -stdlib=libc++ -static-libstdc++ -fuse-ld=lld -l:libc++abi.a test.cpp -o test -./test > /dev/null + # Compile and link with libc++ + run clang++-$VERSION -stdlib=libc++ "${BATS_TMPDIR}/libcxx_test.cpp" -o "${BATS_TMPDIR}/o" + assert_success "Compilation with libc++ failed" + + # Check if the binary is linked against libc++.so.1 + run ldd "${BATS_TMPDIR}/o" + assert_output -p "libc++.so.1" "Binary is not linked against libc++.so.1" + + # Check if the binary is linked against libc++abi.so.1 + run ldd "${BATS_TMPDIR}/o" + assert_output -p "libc++abi.so.1" "Binary is not linked against libc++abi.so.1" + + # Run the compiled binary + run "${BATS_TMPDIR}/o" > /dev/null + assert_success "Execution of binary with libc++ failed" + + # Compile with libc++ and C++11 standard + run clang++-$VERSION -std=c++11 -stdlib=libc++ "${BATS_TMPDIR}/libcxx_test.cpp" -o "${BATS_TMPDIR}/o_cpp11" + assert_success "Compilation with libc++ and C++11 failed" + + # Run the C++11 binary + run "${BATS_TMPDIR}/o_cpp11" > /dev/null + assert_success "Execution of C++11 binary with libc++ failed" + + # Compile with libc++, C++14 standard, and experimental features + run clang++-$VERSION -std=c++14 -stdlib=libc++ "${BATS_TMPDIR}/libcxx_test.cpp" -lc++experimental -o "${BATS_TMPDIR}/o_cpp14" + assert_success "Compilation with libc++, C++14, and experimental features failed" + + # Run the C++14 experimental binary + run "${BATS_TMPDIR}/o_cpp14" > /dev/null + assert_success "Execution of C++14 binary with libc++ and experimental features failed" +} + +@test "Test libc++ filesystem support" { + echo '#include + #include + using namespace std::filesystem; + int main() { + static_assert(std::is_same< + path, + std::filesystem::path + >::value, ""); + return 0; + }' > "${BATS_TMPDIR}/filesystem_test.cpp" -clang++-$VERSION -stdlib=libc++ -nostdlib++ test.cpp -l:libc++.a -l:libc++abi.a -pthread -o test -./test > /dev/null + run clang++-$VERSION -std=c++17 -stdlib=libc++ "${BATS_TMPDIR}/filesystem_test.cpp" -o "${BATS_TMPDIR}/filesystem_test" + assert_success +} -# bug https://bugs.llvm.org/show_bug.cgi?id=43604 +@test "Test libc++ and libc++abi compatibility" { + # Create the C++ source file + echo '#include +int main() { }' > "${BATS_TMPDIR}/foo.cpp" -cat > test.cpp << EOF -#include -__attribute__((visibility("default"))) -extern "C" void plugin() { - std::cout << "Hello World from a plugin!" << std::endl; + # Part 1: Compile and link with libc++ and libc++abi + run clang++-$VERSION -stdlib=libc++ -lc++abi "${BATS_TMPDIR}/foo.cpp" -o "${BATS_TMPDIR}/o_libcxxabi" + assert_success "Compilation with libc++ and libc++abi failed" + + # Execute the binary + run "${BATS_TMPDIR}/o_libcxxabi" > /dev/null + assert_success "Execution of binary linked with libc++ and libc++abi failed" + + # Check if the binary is linked against libc++abi.so.1 + run ldd "${BATS_TMPDIR}/o_libcxxabi" + assert_output -p "libc++abi.so.1" "Binary is not linked against libc++abi.so.1" + + # Part 2: Compile with libc++abi and use libstdc++ headers + run clang++-$VERSION -lc++abi "${BATS_TMPDIR}/foo.cpp" -o "${BATS_TMPDIR}/o_libstdc++" + assert_success "Compilation with libc++abi and libstdc++ headers failed" + + # Execute the binary + run "${BATS_TMPDIR}/o_libstdc++" > /dev/null + assert_success "Execution of binary linked with libc++abi and libstdc++ headers failed" + + # Check if the binary is linked against libstdc++ + run ldd "${BATS_TMPDIR}/o_libstdc++" + assert_output -p "libstdc++.so." "Binary is not linked against libstdc++" } -EOF -clang++-$VERSION -shared -o plugin.so -fvisibility=hidden foo.cpp -static-libstdc++ || true -clang++-$VERSION -shared -o plugin.so -fvisibility=hidden foo.cpp -stdlib=libc++ -static-libstdc++ ||true -rm -f plugin.so - -# Bug 889832 -echo '#include -int main() {}' | clang++-$VERSION -std=c++1z -x c++ -stdlib=libc++ - - -if test ! -f /usr/lib/llvm-$VERSION/include/cxxabi.h; then - echo "Install libc++abi-$VERSION-dev"; - exit -1; -fi - -# Force the usage of libc++abi -clang++-$VERSION -stdlib=libc++ -lc++abi foo.cpp -o o -./o > /dev/null -if ! ldd o 2>&1|grep -q libc++abi.so.1; then - echo "not linked against libc++abi.so.1" - exit -1 -fi - -# Use the libc++abi and uses the libstc++ headers -clang++-$VERSION -lc++abi foo.cpp -o o -./o > /dev/null -if ! ldd o 2>&1|grep -q libstdc++.so.; then - echo "not linked against libstdc++" - exit -1 -fi - -# fs from C++17 -echo ' -#include -#include -using namespace std::filesystem; -int main() { - static_assert(std::is_same< - path, - std::filesystem::path - >::value, ""); -}' > foo.cpp -clang++-$VERSION -std=c++17 -stdlib=libc++ foo.cpp -o o -./o > /dev/null -clang++-$VERSION -std=c++17 -stdlib=libc++ foo.cpp -lc++experimental -o o -./o > /dev/null -# Bug LP#1586215 -echo ' +@test "Test C++ exception handling with libc++ (Bug 1586215)" { + cat > "${BATS_TMPDIR}/foo.cpp" < #include @@ -1069,12 +1345,90 @@ } return 0; -}' > foo.cpp -clang++-$VERSION -stdlib=libc++ -Wall -Werror foo.cpp -o foo -./foo +} +EOF + + run clang++-$VERSION -stdlib=libc++ -Wall -Werror "${BATS_TMPDIR}/foo.cpp" -o "${BATS_TMPDIR}/foo" + assert_success "Compilation with libc++ failed" + + run "${BATS_TMPDIR}/foo" + assert_success "Execution of binary failed" +} +@test "Test inline C++ compilation with libc++ (Bug 889832)" { + echo '#include +int main() {}' > foo.cpp + run clang++-$VERSION -std=c++1z -x c++ -stdlib=libc++ foo.cpp + assert_success "Inline C++ compilation with libc++ failed" +} + +@test "Test inline C++ compilation and libc++ modules (Bug 889832)" { + + echo '#include +int main() {}' > foo.cpp + run clang++-$VERSION -std=c++1z -x c++ -stdlib=libc++ foo.cpp + assert_success "Inline C++ compilation with libc++ failed" + + + cat > "${BATS_TMPDIR}/foo.cpp" < "${BATS_TMPDIR}/main.c" < int main(void) { @@ -1082,111 +1436,474 @@ if (isnan(f)) return 1; return 0; -}' > foo.c -clang-$VERSION -Wconversion -Werror foo.c &> /dev/null || true +} +EOF + + # Compile the C program statically with libllvmlibc + run clang-$VERSION -static -nostdlib -nolibc -L/usr/lib/llvm-$VERSION/lib/ -lllvmlibc \ + "${BATS_TMPDIR}/main.c" -o "${BATS_TMPDIR}/foo" + assert_success "Compilation with libllvmlibc failed" + + # Verify no linkage to regular libc + run ldd "${BATS_TMPDIR}/foo" + refute_output -p "libc." "Binary is linked against regular libc" + + # Run the binary (segfault expected) + run "${BATS_TMPDIR}/foo" + assert_failure "Execution of binary failed (segfault expected)" +} + -if test -f /usr/bin/g++; then -g++ -nostdinc++ -I/usr/lib/llvm-$VERSION/bin/../include/c++/v1/ -L/usr/lib/llvm-$VERSION/lib/ \ - foo.cpp -nodefaultlibs -std=c++17 -lc++ -lc++abi -lm -lc -lgcc_s -lgcc|| true -./o > /dev/null -fi +@test "Test HIP language support" { + if ! dpkg -l | grep -q hipcc; then + skip "hipcc not installed" + fi + + echo '#include + int main() { return 0; }' > "${BATS_TMPDIR}/hip_test.hip" + + run clang++-$VERSION --rocm-path=/usr -x hip -lamdhip64 "${BATS_TMPDIR}/hip_test.hip" + assert_success +} + +@test "Test binary format check with lld" { + echo 'bool testAndSet(void *atomic) { + return __atomic_test_and_set(atomic, __ATOMIC_SEQ_CST); + }' > "${BATS_TMPDIR}/format_test.cpp" + + run clang++-$VERSION -c -target aarch64-linux-gnu "${BATS_TMPDIR}/format_test.cpp" + assert_success -if dpkg -l|grep -q flang-$VERSION; then - echo "Testing flang-$VERSION (Fortran) ..." + run file "format_test.o" + assert_output -p "aarch64" +} + +@test "Test errno header inclusion" { + echo '#include + int main() { return 0; }' > "${BATS_TMPDIR}/errno_test.c" + + run clang-$VERSION "${BATS_TMPDIR}/errno_test.c" + assert_success +} + +@test "Test ARM target features (Bug 930008)" { + run clang-$VERSION --target=arm-linux-gnueabihf -dM -E -xc - < /dev/null + assert_success + assert_output -p "#define __ARM_ARCH 7" +} + +@test "Test Cross TU optimization" { + echo 'int sum(int a, int b);' > "${BATS_TMPDIR}/crosstu_1.h" + echo '#include "crosstu_1.h" + int sum(int a, int b) { return a + b; }' > "${BATS_TMPDIR}/crosstu_1.cpp" + echo '#include "crosstu_1.h" + int main() { return sum(1, 2); }' > "${BATS_TMPDIR}/crosstu_2.cpp" + + run clang++-$VERSION -c "${BATS_TMPDIR}/crosstu_1.cpp" + assert_success + run clang++-$VERSION -c "${BATS_TMPDIR}/crosstu_2.cpp" + assert_success +} + +@test "Test header generation" { + echo "#include " > "${BATS_TMPDIR}/header_test.cc" + run clang++-$VERSION -P -E "${BATS_TMPDIR}/header_test.cc" + assert_success + + # Check if output has more than 60 non-empty lines + run bash -c "clang++-$VERSION -P -E ${BATS_TMPDIR}/header_test.cc | grep . | wc -l" + assert [ "$output" -gt 60 ] +} + +@test "Test atomic operations compilation (Bug 903709)" { + # Bug 903709: Ensure atomic operations compile correctly + + cat > "${BATS_TMPDIR}/atomic_test.c" < +void increment(atomic_size_t *arg) { + atomic_fetch_add(arg, 1); +} +EOF + + run clang-$VERSION -v -c "${BATS_TMPDIR}/atomic_test.c" + assert_success "Compilation of atomic operations (stdatomic.h) failed" +} + +@test "Test profile generation and use" { + echo 'int X = 0; + int main() { + for (int i = 0; i < 100; i++) + X += i; + return 0; + }' > "${BATS_TMPDIR}/profile_test.cc" + + run clang++-$VERSION -O2 -fprofile-instr-generate "${BATS_TMPDIR}/profile_test.cc" -o "${BATS_TMPDIR}/profile_test" + assert_success + + LLVM_PROFILE_FILE="${BATS_TMPDIR}/profile_test-%p.profraw" run "${BATS_TMPDIR}/profile_test" + assert_success + + run llvm-profdata-$VERSION merge -output="${BATS_TMPDIR}/profile_test.profdata" "${BATS_TMPDIR}/profile_test-"*.profraw + assert_success + + run clang++-$VERSION -O2 -fprofile-instr-use="${BATS_TMPDIR}/profile_test.profdata" "${BATS_TMPDIR}/profile_test.cc" -o "${BATS_TMPDIR}/profile_test_final" + assert_success +} + +# ===================== flang + +@test "Test flang Fortran compilation" { echo 'program math implicit none real :: x, y x = 3.14 y = 2.71 print *, "x + y = ", x + y -end program math -' > foo.f90 - flang-new-$VERSION foo.f90 -o foo && ./foo &> foo.log - if ! grep -q "x + y =" foo.log 2>&1; then - echo "flang: Could not find the expected output" - exit -1 +end program math' > foo.f90 + run flang-new-$VERSION foo.f90 -o foo + assert_success + run ./foo + assert_success + assert_output -p "x + y =" +} + +@test "Test flang shared library functionality" { + if ! dpkg -l | grep -q "flang-$VERSION"; then + skip "flang-$VERSION not installed" fi + echo 'module hello_world + contains + subroutine say_hello() + print *, "Hello, World!" + end subroutine say_hello + end module hello_world' > "${BATS_TMPDIR}/flang_lib.f90" - # testing with a shared libraries - echo ' -module hello_world - contains - subroutine say_hello() - print *, "Hello, World!" - end subroutine say_hello -end module hello_world -' > lib.f90 - flang-new-$VERSION -c lib.f90 -fpie - flang-new-$VERSION -shared -fpie -o libflib.so lib.o + run flang-new-$VERSION -c "${BATS_TMPDIR}/flang_lib.f90" -fpie + assert_success - echo ' -program main - use hello_world - call say_hello() -end program main' > foo.f90 - flang-new-$VERSION foo.f90 -L. -lflib -o foo - LD_LIBRARY_PATH=. ./foo &> foo.log - if ! grep -q "Hello, World!" foo.log 2>&1; then - echo "flang: lib didn't work" - exit -1 + run flang-new-$VERSION -shared -fpie -o "${BATS_TMPDIR}/libflib.so" "flang_lib.o" + assert_success + + echo 'program main + use hello_world + call say_hello() + end program main' > "${BATS_TMPDIR}/flang_main.f90" + + run flang-new-$VERSION "${BATS_TMPDIR}/flang_main.f90" -L"${BATS_TMPDIR}" -lflib -o "${BATS_TMPDIR}/flang_test" + assert_success + + LD_LIBRARY_PATH="${BATS_TMPDIR}" run "${BATS_TMPDIR}/flang_test" + assert_output -p "Hello, World!" +} + +@test "Verify llvm-symbolizer functionality in verbose mode" { + # Define the path to llvm-symbolizer + local symbolizer_path="/usr/lib/llvm-${VERSION}/bin/llvm-symbolizer" + + # Ensure llvm-symbolizer exists + run test -f "${symbolizer_path}" + assert_success "llvm-symbolizer is missing" + + # Create a simple test program + echo '#include + int main() { + char *x = (char*)malloc(10 * sizeof(char*)); + free(x); + return x[5]; // Invalid memory access + }' > "${BATS_TMPDIR}/asan_test.c" + + # Compile with AddressSanitizer and enable verbose mode + run clang-$VERSION -o "${BATS_TMPDIR}/asan_test" -fsanitize=address -fno-omit-frame-pointer -g "${BATS_TMPDIR}/asan_test.c" + assert_success + + # Run the test program with verbose symbolizer options + ASAN_OPTIONS=verbosity=2:external_symbolizer_path="${symbolizer_path}" run "${BATS_TMPDIR}/asan_test" + assert_failure + assert_output -p "Using llvm-symbolizer" +} + +@test "Test SIMD intrinsics compilation (AMD64/i386)" { + # Skip test if not on AMD64 or i386 architectures + if [[ "$DEB_HOST_ARCH" != "amd64" && "$DEB_HOST_ARCH" != "i386" ]]; then + skip "Test skipped for non-x86 architectures" fi - rm -f foo.log foo.f90 foo libflib.so -else - echo "Skipping esting flang-$VERSION (Fortran) ..." - echo "doesn't exist on this arch" -fi - -# libc -if dpkg -l libllvmlibc-$VERSION-dev >/dev/null 2>&1; then - echo "Testing llvmlibc-$VERSION-dev ..." - echo ' -#include -int main(void) -{ - double f = 2.0; - if (isnan(f)) - return 1; + + # Create a C++ source file with SIMD intrinsics + echo '#include ' > "${BATS_TMPDIR}/simd_test.cc" + + # Compile the source file + run clang++-$VERSION -c "${BATS_TMPDIR}/simd_test.cc" + assert_success "Compilation of SIMD intrinsics () failed on x86" +} + +@test "Test preprocessing of limits header (Bug 913213)" { + echo '#include ' > "${BATS_TMPDIR}/limits_test.cc" + + # Compile the source file + run clang++-$VERSION -E -c "${BATS_TMPDIR}/limits_test.cc" + assert_output -p "limits.h" + assert_success "Preprocessing of failed" +} + +@test "Test cross-compiler compatibility for C++ objects (Bug 1488254)" { + cat > "${BATS_TMPDIR}/foo.cc" < +std::string hello = "Hello, world!\\n"; +EOF + + cat > "${BATS_TMPDIR}/bar.cc" < +#include +extern std::string hello; +int main() { + std::cout << hello; return 0; -}' > main.c - clang-$VERSION -static -nostdlib -nolibc -L/usr/lib/llvm-$VERSION/lib/ -lllvmlibc main.c -o foo - if ! ldd foo 2>&1|grep -qv libc.; then - echo "linked against regular libc" - exit -1 +} +EOF + + # Test 1: Compile and link using GCC + run g++ -c "${BATS_TMPDIR}/foo.cc" -o "${BATS_TMPDIR}/foo.o" + assert_success "Compilation with GCC failed for foo.cc" + run g++ "${BATS_TMPDIR}/foo.o" "${BATS_TMPDIR}/bar.cc" -o "${BATS_TMPDIR}/a.out" + assert_success "Linking with GCC failed" + run "${BATS_TMPDIR}/a.out" + assert_success "Execution failed for binary compiled and linked with GCC" + + # Test 2: Compile and link using Clang++ + run clang++-$VERSION -c "${BATS_TMPDIR}/foo.cc" -o "${BATS_TMPDIR}/foo.o" + assert_success "Compilation with Clang++ failed for foo.cc" + run clang++-$VERSION "${BATS_TMPDIR}/foo.o" "${BATS_TMPDIR}/bar.cc" -o "${BATS_TMPDIR}/a.out" + assert_success "Linking with Clang++ failed" + run "${BATS_TMPDIR}/a.out" + assert_success "Execution failed for binary compiled and linked with Clang++" + + # Test 3: Compile with GCC, link with Clang++ + run g++ -c "${BATS_TMPDIR}/foo.cc" -o "${BATS_TMPDIR}/foo.o" + assert_success "Compilation with GCC failed for foo.cc" + run clang++-$VERSION "${BATS_TMPDIR}/foo.o" "${BATS_TMPDIR}/bar.cc" -o "${BATS_TMPDIR}/a.out" + assert_success "Linking with Clang++ failed for GCC-compiled object" + run "${BATS_TMPDIR}/a.out" + assert_success "Execution failed for GCC-compiled, Clang++-linked binary" + + # Test 4: Compile with Clang++ -fPIC, link with GCC + run clang++-$VERSION -c "${BATS_TMPDIR}/foo.cc" -fPIC -o "${BATS_TMPDIR}/foo.o" + assert_success "Compilation with Clang++ -fPIC failed for foo.cc" + run g++ "${BATS_TMPDIR}/foo.o" "${BATS_TMPDIR}/bar.cc" -o "${BATS_TMPDIR}/a.out" + assert_success "Linking with GCC failed for Clang++-compiled object" + run "${BATS_TMPDIR}/a.out" + assert_success "Execution failed for Clang++-compiled, GCC-linked binary" +} + +@test "Test static linking and unwind library (Bug 46321)" { + cat > "${BATS_TMPDIR}/test.cpp" < +int main() { + std::cout << "Hello World!" << std::endl; +} +EOF + + # Compile and link with libc++, libunwind, and static libstdc++ + run clang++-$VERSION -stdlib=libc++ -unwindlib=libunwind -rtlib=compiler-rt \ + -static-libstdc++ -static-libgcc "${BATS_TMPDIR}/test.cpp" -lpthread -ldl -o "${BATS_TMPDIR}/test_static" + assert_success "Compilation with static linking and unwind library failed" + + # Execute the binary + run "${BATS_TMPDIR}/test_static" > /dev/null + assert_success "Execution of static-linked binary failed" + + # Compile with libc++, static libstdc++, and LLD + run clang++-$VERSION -stdlib=libc++ -static-libstdc++ -fuse-ld=lld -l:libc++abi.a \ + "${BATS_TMPDIR}/test.cpp" -o "${BATS_TMPDIR}/test_lld" + assert_success "Compilation with LLD failed" + + # Execute the binary + run "${BATS_TMPDIR}/test_lld" > /dev/null + assert_success "Execution of LLD-linked binary failed" + + # Compile with libc++ and nostdlib++ + run clang++-$VERSION -stdlib=libc++ -nostdlib++ "${BATS_TMPDIR}/test.cpp" \ + -l:libc++.a -l:libc++abi.a -pthread -o "${BATS_TMPDIR}/test_nostdlib" + assert_success "Compilation with nostdlib++ failed" + + # Execute the binary + run "${BATS_TMPDIR}/test_nostdlib" > /dev/null + assert_success "Execution of nostdlib++ binary failed" +} + +@test "Test shared plugin compilation (Bug 43604)" { + + cat > "${BATS_TMPDIR}/plugin_test.cpp" < +__attribute__((visibility("default"))) +extern "C" void plugin() { + std::cout << "Hello World from a plugin!" << std::endl; +} +EOF + + # Compile the shared library with hidden visibility and static libstdc++ + run clang++-$VERSION -shared -o "${BATS_TMPDIR}/plugin.so" -fvisibility=hidden \ + "${BATS_TMPDIR}/plugin_test.cpp" -static-libstdc++ || true + assert_success "Compilation of shared plugin with static libstdc++ failed" + + # Compile the shared library with hidden visibility and libc++ + run clang++-$VERSION -shared -o "${BATS_TMPDIR}/plugin.so" -fvisibility=hidden \ + "${BATS_TMPDIR}/plugin_test.cpp" -stdlib=libc++ -static-libstdc++ || true + assert_success "Compilation of shared plugin with libc++ failed" + + # Cleanup + rm -f "${BATS_TMPDIR}/plugin.so" +} + +@test "Test if LLVM IR bitcode in libclangIndex.a" { + rm -f *.o + # Define the path to libclangIndex.a + local archive_path="/usr/lib/llvm-${VERSION}/lib/libclangIndex.a" + + # Ensure the archive exists + run test -f "${archive_path}" + assert_success "libclangIndex.a is missing" + + # Extract the archive contents + run /usr/bin/ar x "${archive_path}" --output "${BATS_TMPDIR}" + assert_success "Failed to extract libclangIndex.a" + + # Check the extracted object files + run file "${BATS_TMPDIR}"/*.o + refute_output -p "LLVM IR bitcode" "Found LLVM IR bitcode in libclangIndex.a" +} + +@test "Test Z3 solver integration for static analysis" { + # Create the C source file + cat > "${BATS_TMPDIR}/z3_test.c" <= 0); // expected-warning{{FALSE}} +} +EOF + + # Step 1: Check if LLVM was built with Z3 support + run clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 "${BATS_TMPDIR}/z3_test.c" &> "${BATS_TMPDIR}/z3_test.log" || true + if grep -q "error: analyzer constraint manager 'z3' is only available if LLVM was built with -DLLVM_ENABLE_Z3_SOLVER=ON" "${BATS_TMPDIR}/z3_test.log"; then + skip "Z3 solver not available in this LLVM build" fi - # segfault for now - ./foo || true -else - echo "libllvmlibc check skipped, no libllvmlibc-$VERSION-dev available." -fi - -# libclc -echo "Testing libclc-$VERSION-dev ..." - -if test ! -f /usr/lib/clc/amdgcn--amdhsa.bc; then - echo "Install libclc-$VERSION"; - exit -1; -fi - -if test ! -f /usr/lib/clc/polaris10-amdgcn-mesa-mesa3d.bc; then - # Make sure that #993904 and #995069 don't come back - echo "/usr/lib/clc/polaris10-amdgcn-mesa-mesa3d.bc doesn't exist" - exit 1 -fi - -BINDIR=$(llvm-config-$VERSION --bindir) -/usr/lib/llvm-$VERSION/share/libclc/check_external_calls.sh /usr/lib/clc/amdgcn--amdhsa.bc $BINDIR > /dev/null - -# libunwind -echo "Testing libunwind-$VERSION-dev ..." - -if test ! -f /usr/include/libunwind/unwind.h; then - echo "Install libunwind-$VERSION-dev"; - exit -1; -fi -echo ' + # Step 2: Run static analysis with Z3 constraints + run clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config eagerly-assume=false -analyzer-constraints=z3 "${BATS_TMPDIR}/z3_test.c" + assert_success "Static analysis with Z3 constraints failed" + + # Step 3: Verify warnings generated + run clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 "${BATS_TMPDIR}/z3_test.c" &> "${BATS_TMPDIR}/z3_test.log" + assert_success "Static analysis with Z3 constraints failed on verification" + cat "${BATS_TMPDIR}/z3_test.log" + assert_output -p "2 warnings generated." + + # Step 4: Run static analysis without Z3 constraints + run clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config eagerly-assume=false "${BATS_TMPDIR}/z3_test.c" &> "${BATS_TMPDIR}/z3_test.log" || true + refute_output -p "File a.c Line 7: UNKNOWN" "Static analysis should fail without Z3 constraints" + + # Step 5: Verify general static analysis warnings + run clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection "${BATS_TMPDIR}/z3_test.c" &> "${BATS_TMPDIR}/z3_test.log" + assert_success "Static analysis failed" + cat "${BATS_TMPDIR}/z3_test.log" + assert_output -p "warnings generated." + +} + +@test "Test atomic test-and-set compilation for AArch64 (Bug 827866)" { + + cat > "${BATS_TMPDIR}/atomic_test.cpp" < "${BATS_TMPDIR}/thinlto_1.c" + echo "int foo(void); int main() { return foo(); }" > "${BATS_TMPDIR}/thinlto_2.c" + + run clang-$VERSION -flto=thin -O2 "${BATS_TMPDIR}/thinlto_1.c" "${BATS_TMPDIR}/thinlto_2.c" -o "${BATS_TMPDIR}/thinlto_test" + assert_success + + run "${BATS_TMPDIR}/thinlto_test" + assert_success +} + +@test "Test compilation and execution with LTO and Gold linker" { + cat > "${BATS_TMPDIR}/foo.c" < +int main() { + if (1==1) { + printf("true"); + } else { + printf("false"); + return 42; + } + return 0; +} +EOF + + # Test 1: Compile with LTO and execute + run clang-$VERSION -flto "${BATS_TMPDIR}/foo.c" -opaque-pointers -o "${BATS_TMPDIR}/foo_lto" + assert_success "Compilation with LTO failed" + run "${BATS_TMPDIR}/foo_lto" + assert_success "Execution of LTO binary failed" + + # Test 2: Compile with Gold linker and execute + run clang-$VERSION -fuse-ld=gold "${BATS_TMPDIR}/foo.c" -o "${BATS_TMPDIR}/foo_gold" + assert_success "Compilation with Gold linker failed" + run "${BATS_TMPDIR}/foo_gold" + assert_success "Execution of binary linked with Gold linker failed" +} + +@test "Test LTO file generation and Gold linker compatibility (Bug 919020)" { + + echo "int foo(void) { return 0; }" > "${BATS_TMPDIR}/foo.c" + + # Compile the source file with LTO + run clang-$VERSION -flto -c "${BATS_TMPDIR}/foo.c" -o "${BATS_TMPDIR}/foo.o" + assert_success "Compilation with LTO failed" + + # Check if the output is LLVM IR bitcode + run file "${BATS_TMPDIR}/foo.o" + assert_output -p "LLVM IR bitcode" "Expected LLVM IR bitcode but found otherwise" + + # Check if the symbol `foo` is present in the LTO object + run llvm-nm-$VERSION "${BATS_TMPDIR}/foo.o" + assert_output -p "T foo" "Symbol 'foo' not found in LTO object file, indicating Gold linker issue" +} + +@test "Test LLVM Exegesis execution validation" { + # Run llvm-exegesis with vzeroupper snippet + echo "vzeroupper" | llvm-exegesis-$VERSION -mode=uops -snippets-file=- &> "${BATS_TMPDIR}/exegesis.log" || true + + # Check for issues related to libpfm initialization + if grep -q -E "(built without libpfm|cannot initialize libpfm)" "${BATS_TMPDIR}/exegesis.log"; then + echo "llvm-exegesis could not run correctly" + head -n 10 "${BATS_TMPDIR}/exegesis.log" + fail "llvm-exegesis execution failed due to libpfm issues" + fi + + # Ensure llvm-exegesis produced output successfully + run test -s "${BATS_TMPDIR}/exegesis.log" + assert_success "llvm-exegesis did not produce valid output" +} + +@test "Test backtrace functionality with libunwind" { + # Create the C++ source file for backtrace tests + cat > "${BATS_TMPDIR}/backtrace_test.cpp" < #include @@ -1236,7 +1953,6 @@ if (ret != UNW_ESUCCESS) abort(); - // Set the IP to an address clearly outside any function. unw_set_reg(&cursor, UNW_REG_IP, (unw_word_t)0); ret = unw_get_proc_info(&cursor, &info); @@ -1250,13 +1966,28 @@ test3(1, 2, 3); test_no_info(); return 0; -}'> foo.cpp -clang++-$VERSION foo.cpp -lunwind -ldl -I /usr/include/libunwind -./a.out -clang++-$VERSION foo.cpp -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind -./a.out +} +EOF -echo ' + # Compile the program with libunwind + run clang++-$VERSION "${BATS_TMPDIR}/backtrace_test.cpp" -lunwind -ldl -I/usr/include/libunwind -o "${BATS_TMPDIR}/backtrace_test" + assert_success "Compilation with libunwind failed" + + # Run the compiled program + run "${BATS_TMPDIR}/backtrace_test" + assert_success "Execution of backtrace test failed" + + # Compile with libunwind and compiler-rt + run clang++-$VERSION "${BATS_TMPDIR}/backtrace_test.cpp" -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind -ldl -o "${BATS_TMPDIR}/backtrace_test_rt" + assert_success "Compilation with libunwind and compiler-rt failed" + + # Run the compiled program with compiler-rt + run "${BATS_TMPDIR}/backtrace_test_rt" + assert_success "Execution of backtrace test with compiler-rt failed" +} +@test "Test signal handling with libunwind" { + # Create the C++ source file for signal handling + cat > "${BATS_TMPDIR}/signal_test.cpp" < #include #include @@ -1271,8 +2002,6 @@ (void)arg; Dl_info info = { 0, 0, 0, 0 }; - // Unwind util the main is reached, above frames depend on the platform and - // architecture. if (dladdr(reinterpret_cast(_Unwind_GetIP(ctx)), &info) && info.dli_sname && !strcmp("main", info.dli_sname)) { _Exit(0); @@ -1291,441 +2020,26 @@ kill(getpid(), SIGUSR1); return -2; } -'> foo.cpp -clang++-$VERSION foo.cpp /usr/lib/llvm-$VERSION/lib/libunwind.a -I/usr/include/libunwind/ -lpthread -ldl -./a.out||true -clang++-$VERSION foo.cpp -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind -ldl -./a.out||true - -if test ! -f /usr/lib/llvm-$VERSION/include/polly/LinkAllPasses.h; then - echo "Install libpolly-$VERSION-dev for polly"; - exit -1; -fi - -echo "Testing polly (libpolly-$VERSION-dev) ..." - -# Polly -echo " -#define N 1536 -float A[N][N]; -float B[N][N]; -float C[N][N]; - -void init_array() -{ - int i, j; - for (i = 0; i < N; i++) { - for (j = 0; j < N; j++) { - A[i][j] = (1+(i*j)%1024)/2.0; - B[i][j] = (1+(i*j)%1024)/2.0; - } - } -} - -int main() -{ - int i, j, k; - double t_start, t_end; - init_array(); - for (i = 0; i < N; i++) { - for (j = 0; j < N; j++) { - C[i][j] = 0; - for (k = 0; k < N; k++) - C[i][j] = C[i][j] + A[i][k] * B[k][j]; - } - } - return 0; -} -" > foo.c -clang-$VERSION -O3 -mllvm -polly -mllvm -polly-parallel -lgomp foo.c -clang-$VERSION -O3 -mllvm -polly -mllvm -polly-vectorizer=stripmine foo.c -clang-$VERSION -S -fsave-optimization-record -emit-llvm foo.c -o matmul.s -# broken https://bugs.llvm.org/show_bug.cgi?id=51642 -test -s matmul.opt.yaml||true - -clang-$VERSION -S -O2 -fsave-optimization-record -emit-llvm foo.c -o matmul.s -if ! test -s matmul.opt.yaml; then - echo "-fsave-optimization-record generated an empty file" - exit 1 -fi - - -opt-$VERSION -S -polly-canonicalize matmul.s > matmul.preopt.ll > /dev/null -opt-$VERSION -basic-aa -polly-ast matmul.preopt.ll -polly-process-unprofitable > /dev/null -if test ! -f /usr/lib/llvm-$VERSION/share/opt-viewer/opt-viewer.py; then - echo "Install llvm-$VERSION-tools" - exit 42 -fi -/usr/lib/llvm-$VERSION/share/opt-viewer/opt-viewer.py -source-dir . matmul.opt.yaml -o ./output > /dev/null - -if ! grep -q "inlined into" output/foo.c.html 2>&1; then - echo "Could not find the output from polly" - exit -1 -fi - -echo " -int foo(int x, int y) __attribute__((always_inline)); -int foo(int x, int y) { return x + y; } -int bar(int j) { return foo(j, j - 2); } -int sum = 0; - -int main(int argc, const char *argv[]) { - for (int i = 0; i < 30; i++) - bar(argc); - return sum; -} - -" > foo.cc -clang-$VERSION -O2 -Rpass=inline foo.cc -c &> foo.log -if ! grep -q -E "(inlined into|cost=always)" foo.log; then - echo "-Rpass fails" - cat foo.log - exit 1 -fi -echo " -int X = 0; - -int main() { - int i; - for (i = 0; i < 100; i++) - X += i; - return 0; -}"> foo.cc -clang++-$VERSION -O2 -fprofile-instr-generate foo.cc -o foo -LLVM_PROFILE_FILE="foo-%p.profraw" ./foo -llvm-profdata-$VERSION merge -output=foo.profdata foo-*.profraw -clang++-$VERSION -O2 -fprofile-instr-use=foo.profdata foo.cc -o foo - -# https://bugs.llvm.org/show_bug.cgi?id=44870 -cat < foo.cpp -#include -#include - -using namespace clang; - -int main() { - DiagnosticsEngine* diags; - HeaderSearchOptions* hsOpts; - CodeGenOptions* cgOpts; - TargetOptions* tOpts; - LangOptions* lOpts; - llvm::StringRef* tDesc; - llvm::Module* m; - BackendAction* action; - std::unique_ptr AsmOutStream; - IntrusiveRefCntPtr VFS; - - EmitBackendOutput(*diags, *hsOpts, *cgOpts, *tOpts, *lOpts, *tDesc, m, *action, VFS, std::move(AsmOutStream)); -} -EOF -clang++-$VERSION foo.cpp -o test -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangCodeGen -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangFrontend -lclangDriver -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -lclangAPINotes -lclangSupport -lclangBasic -ldl /usr/lib/llvm-$VERSION/lib/libLLVM-$VERSION.so -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -ldl -I /usr/lib/llvm-$VERSION/include/ -L/usr/lib/llvm-$VERSION/lib/ -lPolly -lPollyISL - -if test ! -f /usr/bin/lldb-$VERSION; then - echo "Install lldb-$VERSION"; - exit -1; -fi - -echo "b main -run -bt -quit" > lldb-cmd.txt - -echo "Testing lldb-$VERSION ..." -# bug 913946 -lldb-$VERSION -s lldb-cmd.txt bar &> foo.log - -if dpkg -l|grep -q clang-$VERSION-dbgsym; then - # Testing if clang dbg symbol are here - lldb-$VERSION -s lldb-cmd.txt clang-$VERSION &> foo.log - if ! grep "main at driver.cpp" foo.log; then - echo "Could not find the debug info" - echo "Or the main() of clang isn't in driver.cpp anymore" - cat foo.log - exit -1 - fi -else - echo "clang-$VERSION-dbgsym isn't installed" -fi - -echo "Testing wasm support ..." - -if dpkg -l|grep -q wasi-libc; then - cat < printf.c - #include - int main(int argc, char *argv[]) { - printf("%s\n", "Hello World!"); - } EOF - # wasi-libc supports only wasm32 right now - clang-$VERSION -target wasm32-wasi -o printf printf.c - file printf &> foo.log - if ! grep -q "WebAssembly" foo.log; then - echo "the generated file isn't a WebAssembly file?" - exit 1 - fi - rm -f printf.c printf - cat < cout.cpp - #include - int main() { - std::cout << "Hello World!" << std::endl; - } -EOF - # libcxx requires wasi-libc, which only exists for wasm32 right now - clang++-$VERSION --target=wasm32-wasi -o cout cout.cpp - file cout &> foo.log - if ! grep -q "WebAssembly" foo.log; then - echo "the generated file isn't a WebAssembly file?" - exit 1 - fi - rm -f cout.cpp cout -else - echo "wasi-libc not installed" -fi - -echo ' -#include -int main (void) -{ std::vector a; - a.push_back (0); -} -' > foo.cpp -clang++-$VERSION -g -o foo foo.cpp -echo 'target create "./foo" -b main -r -n -p a -quit' > lldb-cmd.txt -lldb-$VERSION -s lldb-cmd.txt ./foo &> foo.log -if ! grep -q "stop reason = step over" foo.log; then - echo "Could not find the lldb expected output" - cat foo.log - # do not fail on i386, never worked here - if [ $DEB_HOST_ARCH != "i386" ]; then - exit 42 - fi -fi - -if test ! -f /usr/lib/llvm-$VERSION/lib/libclangToolingInclusions.a; then - echo "Install libclang-$VERSION-dev"; - exit -1; -fi - -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943623 -rm *.o -/usr/bin/ar x /usr/lib/llvm-$VERSION/lib/libclangIndex.a &> /dev/null -file *.o a> foo.log -rm *.o -if grep "LLVM IR bitcode" foo.log; then - echo "found LLVM IR bitcode in the libclangIndex.a file" - echo "Should be elf" - exit -2 -fi -echo " -from ctypes import * -libclang='/usr/lib/llvm-$VERSION/lib/libclang-$VERSION.so.1' -lib = CDLL(libclang) -fun = lib.clang_getAddressSpace -print(fun) -" > foo.py -python3 foo.py|grep _FuncPtr -rm foo.py - -echo "Testing cmake build ..." - -if grep -q lit-cpuid /usr/lib/llvm-$VERSION/lib/cmake/llvm/LLVMExports*.cmake; then - echo "LLVMExports*.cmake should not have lit-cpuid" - echo "it introduces a dependency between llvm-9 => lldb" - exit -1 -fi - -rm -rf cmaketest && mkdir cmaketest -cat > cmaketest/CMakeLists.txt < /dev/null) -# "Test: CMake find LLVM and Clang in explicit prefix path" -(cd cmaketest/explicit && CC=clang-$VERSION CXX=clang++-$VERSION CMAKE_PREFIX_PATH=/usr/lib/llvm-$VERSION cmake .. > /dev/null) -rm -rf cmaketest - -# Test case for bug #900440 -rm -rf cmaketest && mkdir cmaketest -cat > cmaketest/CMakeLists.txt < /dev/null) -rm -rf cmaketest - -# Make sure the triple change doesn't break the world -# https://reviews.llvm.org/D107799#3027607 -if dpkg -l|grep -q zlib1g-dev; then - rm -rf cmaketest && mkdir cmaketest - cat > cmaketest/CMakeLists.txt < foo.log - if grep "Could NOT find ZLIB" foo.log; then - echo "clang hasn't been able to find zlib dev even if it is on the system" - echo "https://reviews.llvm.org/D107799#3027607" - cat foo.log - exit 1 - fi - cd - - rm -rf cmaketest -fi - -# Test case for bug #994827 -rm -rf cmaketest && mkdir cmaketest -cat > cmaketest/CMakeLists.txt < /dev/null) -rm -rf cmaketest - - -CLANG=clang-$VERSION -#command -v "$CLANG" 1>/dev/null 2>/dev/null || { printf "Usage:\n%s CLANGEXE [ARGS]\n" "$0" 1>&2; exit 1; } -#shift - -TEMPDIR=$(mktemp -d); trap "rm -rf \"$TEMPDIR\"" 0 - -echo "Testing all other sanitizers ..." - -echo "int main() { return 1; }" > foo.c -# fails to run on i386 with the following error: -#clang: error: unsupported option '-fsanitize=efficiency-working-set' for target 'i686-pc-linux-gnu' -# seems like esan was removed from clang: https://github.com/llvm/llvm-project/commit/885b790f89b6068ec4caad8eaa51aa8098327059 -#clang-$VERSION -fsanitize=efficiency-working-set -o foo foo.c || true -#./foo &> /dev/null || true - -cat > "$TEMPDIR/test.c" < -#include -int main () -{ -#if __has_feature(address_sanitizer) - puts("address_sanitizer"); -#endif -#if __has_feature(thread_sanitizer) - puts("thread_sanitizer"); -#endif -#if __has_feature(memory_sanitizer) - puts("memory_sanitizer"); -#endif -#if __has_feature(undefined_sanitizer) - puts("undefined_sanitizer"); -#endif -#if __has_feature(dataflow_sanitizer) - puts("dataflow_sanitizer"); -#endif -#if __has_feature(efficiency_sanitizer) - puts("efficiency_sanitizer"); -#endif - printf("Ok\n"); - return EXIT_SUCCESS; + # Compile the program with libunwind statically + run clang++-$VERSION "${BATS_TMPDIR}/signal_test.cpp" /usr/lib/llvm-$VERSION/lib/libunwind.a -I/usr/include/libunwind/ -lpthread -ldl -o "${BATS_TMPDIR}/signal_test_static" + assert_success "Compilation of signal handler with static libunwind failed" + + # Run the statically linked program (should exit gracefully) + run "${BATS_TMPDIR}/signal_test_static" + assert_failure "Execution of signal handler with static libunwind failed" + + # Compile with libunwind dynamically + run clang++-$VERSION "${BATS_TMPDIR}/signal_test.cpp" -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind -ldl -o "${BATS_TMPDIR}/signal_test_dynamic" + assert_success "Compilation of signal handler with dynamic libunwind failed" + + # Run the dynamically linked program (should exit gracefully) + run "${BATS_TMPDIR}/signal_test_dynamic" + assert_failure "Execution of signal handler with dynamic libunwind failed" +} + +teardown() { + rm -f clangd.json *.o foo* crash-* *profraw hello* a.out polly_test.c + rm -rf scan-build output } -EOF - -F=$(clang-$VERSION --target=x86_64-unknown-linux-gnu --rtlib=compiler-rt --print-libgcc-file-name) -if test ! $F; then - echo "Cannot find $F" - echo "TODO check if the exit1 can be put back" -# exit 1 -else - echo "$F is one of the compiler-rt file" -fi - -# only for AMD64 for now -# many sanitizers only work on AMD64 -# x32 programs need to be enabled in the kernel bootparams for debian -# (https://wiki.debian.org/X32Port) -# -# SYSTEM should iterate multiple targets (eg. x86_64-unknown-none-gnu for embedded) -# MARCH should iterate the library architectures via flags -# LIB should iterate the different libraries -echo "if it fails, please run" -echo "apt-get install libc6-dev:i386 libgcc-5-dev:i386 libc6-dev-x32 libx32gcc-5-dev libx32gcc-9-dev" -for SYSTEM in ""; do - # add "-m32 -march=i686" -m32 -mx32 to test multiarch with i386 - for MARCH in -m64; do - for LIB in --rtlib=compiler-rt -fsanitize=address -fsanitize=thread -fsanitize=memory -fsanitize=undefined -fsanitize=dataflow; do # -fsanitize=efficiency-working-set; do - if test "$MARCH" == "-m32" -o "$MARCH" == "-mx32"; then - if test $LIB == "-fsanitize=thread" -o $LIB == "-fsanitize=memory" -o $LIB == "-fsanitize=dataflow" -o $LIB == "-fsanitize=address" -o $LIB == "-fsanitize=undefined"; then - echo "Skip $MARCH / $LIB"; - continue - fi - fi - if test "$MARCH" == "-m32 -march=i686"; then - if test $LIB == "-fsanitize=memory" -o $LIB == "-fsanitize=thread" -o $LIB == "-fsanitize=dataflow"; then - echo "Skip $MARCH / $LIB"; - continue - fi - fi - XARGS="$SYSTEM $MARCH $LIB" - printf "\nTest: clang %s\n" "$XARGS" - rm -f "$TEMPDIR/test" - "$CLANG" $XARGS -o "$TEMPDIR/test" "$@" "$TEMPDIR/test.c" || true - [ ! -e "$TEMPDIR/test" ] || { "$TEMPDIR/test" || printf 'Error\n'; } - done - done -done - -echo "If the following fails, try setting an environment variable such as:" -echo "OBJC_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/include" -echo "libobjc-9-dev should be also installed" -echo "#include " > foo.m -#clang-$VERSION -c foo.m - -if test ! -f /usr/lib/llvm-$VERSION/lib/libclangBasic.a; then - echo "Install libclang-$VERSION-dev" - exit 1 -fi - -# check that the hip language is functioning -echo "Testing HIP language ..." -if dpkg -l|grep -q hipcc; then - cat > foo.hip < -int main() { return 0; } -EOF - clang++-$VERSION --rocm-path=/usr -x hip -lamdhip64 foo.hip - rm -f foo.hip hip -fi - -#clean up -rm -f a.out bar crash-* foo foo.* lldb-cmd.txt main.* test_fuzzer.cc foo.* o -rm -rf output matmul.* *profraw opt.ll a.json default.profdata test test.cpp - -echo "Completed" diff -Nru llvm-toolchain-19-19.1.4/debian/rules llvm-toolchain-19-19.1.7/debian/rules --- llvm-toolchain-19-19.1.4/debian/rules 2024-11-27 23:40:11.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/rules 2025-02-25 18:37:49.000000000 +0000 @@ -72,7 +72,7 @@ ifeq ($(BD_ALT_HELLO),yes) BD_ALT_HELLO_SUBST = 's/@BEGIN_OPTIONAL_HELLO@//g;s/@END_OPTIONAL_HELLO@//g' else - BD_ALT_HELLO_SUBST = '/@BEGIN_OPTIONAL_HELLO@/,/@END_OPTIONAL_HELLO@/d' + BD_ALT_HELLO_SUBST = 's/@BEGIN_OPTIONAL_HELLO@.*@END_OPTIONAL_HELLO@//' endif # this contains all packages to be built. Note that for at least the clean target, @@ -137,6 +137,14 @@ endif include /usr/share/dpkg/buildflags.mk +# Remove -Bsymbolic-functions for causing: +# https://github.com/llvm/llvm-project/issues/59432#issuecomment-2500694332 +ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) +ifneq (,$(LDFLAGS)) + LDFLAGS := $(filter-out %-Bsymbolic-functions,$(LDFLAGS)) +endif +endif + # We use a stage2 build. It means that a first clang is built using gcc, # a second clang is built with the first # And the various components are built using the second clang. @@ -179,7 +187,6 @@ # toggleable defaults COMPILER_RT_USE_BUILTINS_LIBRARY := ON -LIBCXX_EXCEPTIONS := ON LIBCXX_USE_COMPILER_RT := ON # We want to set the clang extra version ONLY in stage 2 @@ -300,7 +307,6 @@ ifneq (,$(filter $(DEB_HOST_ARCH),s390x)) STAGE_ALL_CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=s390x-linux-gnu - LIBCXX_EXCEPTIONS := OFF # disable compiler-rt builtins (not supported for s390x) STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_BUILD_BUILTINS=OFF COMPILER_RT_USE_BUILTINS_LIBRARY := OFF @@ -730,22 +736,20 @@ -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" \ -e $(BD_ALT_HELLO_SUBST) \ $$f > $$f2; \ + if grep -q -m 1 '^#! */.*bin/' $$f; then \ + if ! [ -x $$f ]; then \ + echo "error: $$f: perm r, but using dh-exec"; \ + exit 1; \ + fi; \ + else \ + if [ -x $$f ]; then \ + echo "error: $$f: perm x, but no dh-exec"; \ + exit 1; \ + fi; \ + fi; \ [ -x $$f ] && chmod +x $$f2; \ done - # Make install file executable for dh-exec - chmod +x \ - debian/clang-tools-$(LLVM_VERSION).install \ - debian/libclang-$(LLVM_VERSION)-dev.install \ - debian/libclang-rt-$(LLVM_VERSION)-dev.install \ - debian/libpolly-$(LLVM_VERSION)-dev.install \ - debian/libomp-$(LLVM_VERSION)-dev.install \ - debian/libomp5-$(LLVM_VERSION).install \ - debian/llvm-$(LLVM_VERSION)-dev.install \ - debian/llvm-$(LLVM_VERSION)-linker-tools.install \ - debian/llvm-$(LLVM_VERSION)-linker-tools.links \ - debian/libbolt-$(LLVM_VERSION)-dev.install - # workaround the breaks/replaces/conflicts introduced with the libc++ move # we update the version to make it work with apt.llvm.org # Yeah, this is ugly but I don't know how to do better @@ -891,10 +895,10 @@ -DCOMPILER_RT_USE_LIBCXX=OFF \ -DCOMPILER_RT_USE_BUILTINS_LIBRARY=$(COMPILER_RT_USE_BUILTINS_LIBRARY) \ -DLIBUNWIND_INSTALL_LIBRARY=OFF \ - -DLIBCXXABI_ENABLE_EXCEPTIONS=$(LIBCXX_EXCEPTIONS) \ + -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \ -DLIBCXXABI_USE_COMPILER_RT=$(LIBCXX_USE_COMPILER_RT) \ -DLIBCXXABI_INSTALL_LIBRARY=OFF \ - -DLIBCXX_ENABLE_EXCEPTIONS=$(LIBCXX_EXCEPTIONS) \ + -DLIBCXX_ENABLE_EXCEPTIONS=ON \ -DLIBCXX_USE_COMPILER_RT=$(LIBCXX_USE_COMPILER_RT) \ -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \ @@ -1501,7 +1505,7 @@ override_dh_strip: : # running out of diskspace on the buildds - find $(TARGET_BUILD) -name '*.o' -o -name '*.a' -type f | xargs -r rm -f + find $(TARGET_BUILD) \( -name '*.o' -o -name '*.a' \) -type f | xargs -r rm -f ifeq (0, $(strip $(shell dpkg --compare-versions $(DH_VERSION) ge 9.20160114; echo $$?))) : # If we don't have the right version of debhelper, don't run the option dh_strip -p libclang$(SONAME_EXT)-$(LLVM_VERSION) --dbgsym-migration='libclang$(SONAME_EXT)-$(LLVM_VERSION)-dbg' diff -Nru llvm-toolchain-19-19.1.4/debian/source/lintian-overrides llvm-toolchain-19-19.1.7/debian/source/lintian-overrides --- llvm-toolchain-19-19.1.4/debian/source/lintian-overrides 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/source/lintian-overrides 2024-12-17 10:50:27.000000000 +0000 @@ -13,16 +13,17 @@ source: source-contains-prebuilt-windows-binary lldb/unittests/SymbolFile/DWARF/Inputs/test-dwarf.exe source: source-contains-prebuilt-windows-binary lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.exe source: source-contains-prebuilt-windows-binary lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe -source: source-is-missing lldb/lit/Modules/ELF/Inputs/netbsd-amd64.core -source: source-is-missing llgo/third_party/gofrontend/libgo/go/debug/dwarf/testdata/*.elf* -source: source-is-missing llgo/third_party/gofrontend/libgo/go/debug/elf/testdata/gcc-*-exec -source: source-is-missing llgo/third_party/gofrontend/libgo/go/debug/elf/testdata/*.obj -source: source-is-missing llvm/test/* -source: source-is-missing llvm/unittests/* -source: source-is-missing lldb/test/* -source: source-is-missing lld/test/* -source: source-is-missing clang/test/Driver/Inputs/dummy-elf.o -source: source-is-missing clang/test/CodeGen/Inputs/memprof.exe +source: source-is-missing [lldb/lit/Modules/ELF/Inputs/netbsd-amd64.core] +source: source-is-missing [llgo/third_party/gofrontend/libgo/go/debug/dwarf/testdata/*.elf*] +source: source-is-missing [llgo/third_party/gofrontend/libgo/go/debug/elf/testdata/gcc-*-exec] +source: source-is-missing [llgo/third_party/gofrontend/libgo/go/debug/elf/testdata/*.obj] +source: source-is-missing [llvm/test/*] +source: source-is-missing [llvm/unittests/*] +source: source-is-missing [lldb/test/*] +source: source-is-missing [lld/test/*] +source: source-is-missing [clang/test/Driver/Inputs/dummy-elf.o] +source: source-is-missing [*exe] +source: source-is-missing [*dll] # By design source: invalid-arch-string-in-source-relation riscv64* diff -Nru llvm-toolchain-19-19.1.4/debian/tests/control llvm-toolchain-19-19.1.7/debian/tests/control --- llvm-toolchain-19-19.1.4/debian/tests/control 2024-11-26 09:14:24.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/tests/control 2025-06-24 19:05:25.000000000 +0000 @@ -1,5 +1,5 @@ Test-Command: bash -v ./debian/qualify-clang.sh -Depends: @, cmake, make, g++, file, dpkg-dev +Depends: @, cmake, make, g++, file, dpkg-dev, binutils-gold, bats, bats-assert # Comment the dbgsym package because of bug #917528 # dbgsym packages not being available in testing # clang-19-dbgsym, libclang1-19-dbgsym @@ -7,7 +7,7 @@ Architecture: amd64 arm64 i386 Tests: integration-test-suite-test -Depends: @, cmake, make, g++, libstdc++-14-dev +Depends: @, cmake, make, g++, binutils-gold Restrictions: allow-stderr Architecture: amd64 arm64 diff -Nru llvm-toolchain-19-19.1.4/debian/tests/control.in llvm-toolchain-19-19.1.7/debian/tests/control.in --- llvm-toolchain-19-19.1.4/debian/tests/control.in 2024-11-26 09:09:43.000000000 +0000 +++ llvm-toolchain-19-19.1.7/debian/tests/control.in 2025-02-25 18:37:49.000000000 +0000 @@ -1,5 +1,5 @@ Test-Command: bash -v ./debian/qualify-clang.sh -Depends: @, cmake, make, g++, file, dpkg-dev +Depends: @, cmake, make, g++, file, dpkg-dev, binutils-gold, bats, bats-assert # Comment the dbgsym package because of bug #917528 # dbgsym packages not being available in testing # clang-@LLVM_VERSION@-dbgsym, libclang1-@LLVM_VERSION@-dbgsym @@ -7,7 +7,7 @@ Architecture: amd64 arm64 i386 Tests: integration-test-suite-test -Depends: @, cmake, make, g++, libstdc++-14-dev +Depends: @, cmake, make, g++, binutils-gold Restrictions: allow-stderr Architecture: amd64 arm64 diff -Nru llvm-toolchain-19-19.1.4/integration-test-suite/tests/test_asan_libc++.cpp llvm-toolchain-19-19.1.7/integration-test-suite/tests/test_asan_libc++.cpp --- llvm-toolchain-19-19.1.4/integration-test-suite/tests/test_asan_libc++.cpp 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/integration-test-suite/tests/test_asan_libc++.cpp 2025-01-14 16:30:00.000000000 +0000 @@ -0,0 +1,14 @@ +// Make sure that libc++ and asan work correctly +// can be caused by -Bsymbolic-functions +// https://github.com/llvm/llvm-project/issues/59432 +// RUN: %clangxx -xc++ - -stdlib=libc++ -fsanitize=address %s -o %t +// RUN: %t +// REQUIRES: clang, compiler-rt, libc++ +// + +#include +int main() { +#if CLANG_MAJOR > 18 + std::logic_error(""); +#endif +} diff -Nru llvm-toolchain-19-19.1.4/libcxx/include/__config llvm-toolchain-19-19.1.7/libcxx/include/__config --- llvm-toolchain-19-19.1.4/libcxx/include/__config 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/libcxx/include/__config 2025-01-14 16:29:56.000000000 +0000 @@ -27,7 +27,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 190104 +# define _LIBCPP_VERSION 190107 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff -Nru llvm-toolchain-19-19.1.4/lld/ELF/Arch/Hexagon.cpp llvm-toolchain-19-19.1.7/lld/ELF/Arch/Hexagon.cpp --- llvm-toolchain-19-19.1.4/lld/ELF/Arch/Hexagon.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/ELF/Arch/Hexagon.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -329,7 +329,7 @@ case R_HEX_B22_PCREL: case R_HEX_GD_PLT_B22_PCREL: case R_HEX_PLT_B22_PCREL: - checkInt(loc, val, 22, rel); + checkInt(loc, val, 24, rel); or32le(loc, applyMask(0x1ff3ffe, val >> 2)); break; case R_HEX_B22_PCREL_X: diff -Nru llvm-toolchain-19-19.1.4/lld/test/ELF/emulation-loongarch.s llvm-toolchain-19-19.1.7/lld/test/ELF/emulation-loongarch.s --- llvm-toolchain-19-19.1.4/lld/test/ELF/emulation-loongarch.s 2024-11-26 09:13:12.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/test/ELF/emulation-loongarch.s 2025-01-14 16:29:56.000000000 +0000 @@ -37,7 +37,7 @@ # LA32-NEXT: StringTableSectionIndex: # LA32-NEXT: } -# RUN: llvm-mc -filetype=obj -triple=loongarch64 %s -o %t.o +# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+d %s -o %t.o # RUN: ld.lld %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=LA64 %s # RUN: ld.lld -m elf64loongarch %t.o -o %t diff -Nru llvm-toolchain-19-19.1.4/lld/test/ELF/hexagon-jump-error.s llvm-toolchain-19-19.1.7/lld/test/ELF/hexagon-jump-error.s --- llvm-toolchain-19-19.1.4/lld/test/ELF/hexagon-jump-error.s 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/test/ELF/hexagon-jump-error.s 2024-12-03 22:44:48.000000000 +0000 @@ -25,7 +25,7 @@ .section b15, "ax" 1: -# CHECK: relocation R_HEX_B22_PCREL out of range: 8388612 is not in [-2097152, 2097151] +# CHECK: relocation R_HEX_B22_PCREL out of range: 8388612 is not in [-8388608, 8388607] jump #1f .space (1<<23) .section b22, "ax" diff -Nru llvm-toolchain-19-19.1.4/lld/test/ELF/hexagon.s llvm-toolchain-19-19.1.7/lld/test/ELF/hexagon.s --- llvm-toolchain-19-19.1.4/lld/test/ELF/hexagon.s 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/test/ELF/hexagon.s 2024-12-03 22:44:48.000000000 +0000 @@ -1,7 +1,9 @@ # REQUIRES: hexagon # RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t.o # RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %S/Inputs/hexagon.s -o %t1.o -# RUN: ld.lld %t.o %t1.o -o %t +# RUN: ld.lld %t.o %t1.o -o %t --Ttext=0x200b4 --section-start=b_1000000=0x1000000 \ +# RUN: --section-start=b_1000400=0x1000400 --section-start=b_1004000=0x1004000 \ +# RUN: --section-start=b_1010000=0x1010000 --section-start=b_1800000=0x1800000 # RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck %s # Note: 131584 == 0x20200 @@ -221,3 +223,40 @@ memw(r0+##_start) = r1 # CHECK: memw(r0+##131644) = r1 + + +## Tests for maximum branch ranges reachable without trampolines. + +.section b_1000000, "ax" +## The nop makes sure the first jump is within range. +nop +{ r0 = #0; jump #b_1000400 } // R_HEX_B9_PCREL +if (r0==#0) jump:t #b_1004000 // R_HEX_B13_PCREL +if (p0) jump #b_1010000 // R_HEX_B15_PCREL +jump #b_1800000 // R_HEX_B22_PCREL + +.section b_1000400, "ax" +nop + +.section b_1004000, "ax" +nop + +.section b_1010000, "ax" +nop + +.section b_1800000, "ax" +nop + +## Make sure we got the right relocations. +# RUN: llvm-readelf -r %t.o | FileCheck %s --check-prefix=REL +# REL: R_HEX_B9_PCREL 00000000 b_1000400 +# REL: R_HEX_B13_PCREL 00000000 b_1004000 +# REL: R_HEX_B15_PCREL 00000000 b_1010000 +# REL: R_HEX_B22_PCREL 00000000 b_1800000 + +# CHECK: 01000000 : +# CHECK-NEXT: 1000000: {{.*}} { nop } +# CHECK-NEXT: 1000004: {{.*}} { r0 = #0 ; jump 0x1000400 } +# CHECK-NEXT: 1000008: {{.*}} { if (r0==#0) jump:t 0x1004000 } +# CHECK-NEXT: 100000c: {{.*}} { if (p0) jump:nt 0x1010000 } +# CHECK-NEXT: 1000010: {{.*}} { jump 0x1800000 } diff -Nru llvm-toolchain-19-19.1.4/lld/test/ELF/loongarch-interlink.test llvm-toolchain-19-19.1.7/lld/test/ELF/loongarch-interlink.test --- llvm-toolchain-19-19.1.4/lld/test/ELF/loongarch-interlink.test 2024-11-26 09:13:12.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/test/ELF/loongarch-interlink.test 2025-01-14 16:29:56.000000000 +0000 @@ -3,9 +3,9 @@ # RUN: yaml2obj %t/blob.yaml -o %t/blob.o # RUN: yaml2obj %t/v0-lp64d.yaml -o %t/v0-lp64d.o -# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-gnu %t/start.s -o %t/v1-lp64d.o +# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-gnu --mattr=+d %t/start.s -o %t/v1-lp64d.o # RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-gnusf %t/start.s -o %t/v1-lp64s.o -# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-gnu %t/bar.s -o %t/v1-b-lp64d.o +# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-gnu --mattr=+d %t/bar.s -o %t/v1-b-lp64d.o ## Check that binary input results in e_flags=0 output. # RUN: ld.lld -m elf64loongarch -b binary %t/blob.bin -o %t/blob.out diff -Nru llvm-toolchain-19-19.1.4/lld/wasm/SyntheticSections.cpp llvm-toolchain-19-19.1.7/lld/wasm/SyntheticSections.cpp --- llvm-toolchain-19-19.1.4/lld/wasm/SyntheticSections.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/lld/wasm/SyntheticSections.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -587,8 +587,7 @@ initExpr.Inst.Value.Global = WasmSym::tableBase->getGlobalIndex(); } else { bool is64 = config->is64.value_or(false); - initExpr.Inst.Opcode = is64 ? WASM_OPCODE_I64_CONST : WASM_OPCODE_I32_CONST; - initExpr.Inst.Value.Int32 = config->tableBase; + initExpr = intConst(config->tableBase, is64); } writeInitExpr(os, initExpr); diff -Nru llvm-toolchain-19-19.1.4/llvm/cmake/modules/Findzstd.cmake llvm-toolchain-19-19.1.7/llvm/cmake/modules/Findzstd.cmake --- llvm-toolchain-19-19.1.4/llvm/cmake/modules/Findzstd.cmake 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/cmake/modules/Findzstd.cmake 2025-01-07 20:40:33.000000000 +0000 @@ -10,7 +10,7 @@ # zstd::libzstd_shared # zstd::libzstd_static -if(MSVC) +if(MSVC OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") set(zstd_STATIC_LIBRARY_SUFFIX "_static\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") else() set(zstd_STATIC_LIBRARY_SUFFIX "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") @@ -33,7 +33,8 @@ set(zstd_STATIC_LIBRARY "${zstd_LIBRARY}") elseif (NOT TARGET zstd::libzstd_shared) add_library(zstd::libzstd_shared SHARED IMPORTED) - if(MSVC) + if(MSVC OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") + include(GNUInstallDirs) # For CMAKE_INSTALL_LIBDIR and friends. # IMPORTED_LOCATION is the path to the DLL and IMPORTED_IMPLIB is the "library". get_filename_component(zstd_DIRNAME "${zstd_LIBRARY}" DIRECTORY) if(NOT "${CMAKE_INSTALL_LIBDIR}" STREQUAL "" AND NOT "${CMAKE_INSTALL_BINDIR}" STREQUAL "") diff -Nru llvm-toolchain-19-19.1.4/llvm/include/llvm/Analysis/MemorySSAUpdater.h llvm-toolchain-19-19.1.7/llvm/include/llvm/Analysis/MemorySSAUpdater.h --- llvm-toolchain-19-19.1.4/llvm/include/llvm/Analysis/MemorySSAUpdater.h 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/include/llvm/Analysis/MemorySSAUpdater.h 2025-01-14 16:29:56.000000000 +0000 @@ -192,6 +192,11 @@ const BasicBlock *BB, MemorySSA::InsertionPlace Point); + MemoryAccess *createMemoryAccessInBB(Instruction *I, MemoryAccess *Definition, + const BasicBlock *BB, + MemorySSA::InsertionPlace Point, + bool CreationMustSucceed); + /// Create a MemoryAccess in MemorySSA before an existing MemoryAccess. /// /// See createMemoryAccessInBB() for usage details. diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Analysis/MemorySSAUpdater.cpp llvm-toolchain-19-19.1.7/llvm/lib/Analysis/MemorySSAUpdater.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Analysis/MemorySSAUpdater.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Analysis/MemorySSAUpdater.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -1404,8 +1404,17 @@ MemoryAccess *MemorySSAUpdater::createMemoryAccessInBB( Instruction *I, MemoryAccess *Definition, const BasicBlock *BB, MemorySSA::InsertionPlace Point) { - MemoryUseOrDef *NewAccess = MSSA->createDefinedAccess(I, Definition); - MSSA->insertIntoListsForBlock(NewAccess, BB, Point); + return createMemoryAccessInBB(I, Definition, BB, Point, + /*CreationMustSucceed=*/true); +} + +MemoryAccess *MemorySSAUpdater::createMemoryAccessInBB( + Instruction *I, MemoryAccess *Definition, const BasicBlock *BB, + MemorySSA::InsertionPlace Point, bool CreationMustSucceed) { + MemoryUseOrDef *NewAccess = MSSA->createDefinedAccess( + I, Definition, /*Template=*/nullptr, CreationMustSucceed); + if (NewAccess) + MSSA->insertIntoListsForBlock(NewAccess, BB, Point); return NewAccess; } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Analysis/ScalarEvolution.cpp llvm-toolchain-19-19.1.7/llvm/lib/Analysis/ScalarEvolution.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Analysis/ScalarEvolution.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Analysis/ScalarEvolution.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -6313,8 +6313,10 @@ return getConstantMultiple(Z->getOperand()).zext(BitWidth); } case scSignExtend: { + // Only multiples that are a power of 2 will hold after sext. const SCEVSignExtendExpr *E = cast(S); - return getConstantMultiple(E->getOperand()).sext(BitWidth); + uint32_t TZ = getMinTrailingZeros(E->getOperand()); + return GetShiftedByZeros(TZ); } case scMulExpr: { const SCEVMulExpr *M = cast(S); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/MachineLICM.cpp llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/MachineLICM.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/MachineLICM.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/MachineLICM.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -1474,7 +1474,7 @@ if (!AllowedToHoistLoads[Loop]) continue; for (auto &MI : *MBB) { - if (!MI.mayStore() && !MI.isCall() && + if (!MI.isLoadFoldBarrier() && !MI.mayStore() && !MI.isCall() && !(MI.mayLoad() && MI.hasOrderedMemoryRef())) continue; for (MachineLoop *L = Loop; L != nullptr; L = L->getParentLoop()) diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h --- llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h 2025-01-14 16:29:56.000000000 +0000 @@ -838,7 +838,7 @@ SDValue ScalarizeVecRes_BUILD_VECTOR(SDNode *N); SDValue ScalarizeVecRes_EXTRACT_SUBVECTOR(SDNode *N); SDValue ScalarizeVecRes_FP_ROUND(SDNode *N); - SDValue ScalarizeVecRes_ExpOp(SDNode *N); + SDValue ScalarizeVecRes_UnaryOpWithExtraInput(SDNode *N); SDValue ScalarizeVecRes_INSERT_VECTOR_ELT(SDNode *N); SDValue ScalarizeVecRes_LOAD(LoadSDNode *N); SDValue ScalarizeVecRes_SCALAR_TO_VECTOR(SDNode *N); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp 2025-01-14 16:29:56.000000000 +0000 @@ -58,7 +58,11 @@ case ISD::BUILD_VECTOR: R = ScalarizeVecRes_BUILD_VECTOR(N); break; case ISD::EXTRACT_SUBVECTOR: R = ScalarizeVecRes_EXTRACT_SUBVECTOR(N); break; case ISD::FP_ROUND: R = ScalarizeVecRes_FP_ROUND(N); break; - case ISD::FPOWI: R = ScalarizeVecRes_ExpOp(N); break; + case ISD::AssertZext: + case ISD::AssertSext: + case ISD::FPOWI: + R = ScalarizeVecRes_UnaryOpWithExtraInput(N); + break; case ISD::INSERT_VECTOR_ELT: R = ScalarizeVecRes_INSERT_VECTOR_ELT(N); break; case ISD::LOAD: R = ScalarizeVecRes_LOAD(cast(N));break; case ISD::SCALAR_TO_VECTOR: R = ScalarizeVecRes_SCALAR_TO_VECTOR(N); break; @@ -426,7 +430,7 @@ N->getOperand(1)); } -SDValue DAGTypeLegalizer::ScalarizeVecRes_ExpOp(SDNode *N) { +SDValue DAGTypeLegalizer::ScalarizeVecRes_UnaryOpWithExtraInput(SDNode *N) { SDValue Op = GetScalarizedVector(N->getOperand(0)); return DAG.getNode(N->getOpcode(), SDLoc(N), Op.getValueType(), Op, N->getOperand(1)); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/MC/WasmObjectWriter.cpp llvm-toolchain-19-19.1.7/llvm/lib/MC/WasmObjectWriter.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/MC/WasmObjectWriter.cpp 2024-11-26 09:13:13.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/MC/WasmObjectWriter.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1326,6 +1326,22 @@ return true; } +static bool isSectionReferenced(MCAssembler &Asm, MCSectionWasm &Section) { + StringRef SectionName = Section.getName(); + + for (const MCSymbol &S : Asm.symbols()) { + const auto &WS = static_cast(S); + if (WS.isData() && WS.isInSection()) { + auto &RefSection = static_cast(WS.getSection()); + if (RefSection.getName() == SectionName) { + return true; + } + } + } + + return false; +} + void WasmObjectWriter::prepareImports( SmallVectorImpl &Imports, MCAssembler &Asm) { // For now, always emit the memory import, since loads and stores are not @@ -1482,8 +1498,10 @@ LLVM_DEBUG(dbgs() << "Processing Section " << SectionName << " group " << Section.getGroup() << "\n";); - // .init_array sections are handled specially elsewhere. - if (SectionName.starts_with(".init_array")) + // .init_array sections are handled specially elsewhere, include them in + // data segments if and only if referenced by a symbol. + if (SectionName.starts_with(".init_array") && + !isSectionReferenced(Asm, Section)) continue; // Code is handled separately @@ -1853,49 +1871,54 @@ if (EmptyFrag.getKind() != MCFragment::FT_Data) report_fatal_error(".init_array section should be aligned"); - const MCFragment &AlignFrag = *EmptyFrag.getNext(); - if (AlignFrag.getKind() != MCFragment::FT_Align) - report_fatal_error(".init_array section should be aligned"); - if (cast(AlignFrag).getAlignment() != - Align(is64Bit() ? 8 : 4)) - report_fatal_error(".init_array section should be aligned for pointers"); - - const MCFragment &Frag = *AlignFrag.getNext(); - if (Frag.hasInstructions() || Frag.getKind() != MCFragment::FT_Data) - report_fatal_error("only data supported in .init_array section"); - - uint16_t Priority = UINT16_MAX; - unsigned PrefixLength = strlen(".init_array"); - if (WS.getName().size() > PrefixLength) { - if (WS.getName()[PrefixLength] != '.') + const MCFragment *nextFrag = EmptyFrag.getNext(); + while (nextFrag != nullptr) { + const MCFragment &AlignFrag = *nextFrag; + if (AlignFrag.getKind() != MCFragment::FT_Align) + report_fatal_error(".init_array section should be aligned"); + if (cast(AlignFrag).getAlignment() != + Align(is64Bit() ? 8 : 4)) report_fatal_error( - ".init_array section priority should start with '.'"); - if (WS.getName().substr(PrefixLength + 1).getAsInteger(10, Priority)) - report_fatal_error("invalid .init_array section priority"); - } - const auto &DataFrag = cast(Frag); - const SmallVectorImpl &Contents = DataFrag.getContents(); - for (const uint8_t * - P = (const uint8_t *)Contents.data(), - *End = (const uint8_t *)Contents.data() + Contents.size(); - P != End; ++P) { - if (*P != 0) - report_fatal_error("non-symbolic data in .init_array section"); - } - for (const MCFixup &Fixup : DataFrag.getFixups()) { - assert(Fixup.getKind() == - MCFixup::getKindForSize(is64Bit() ? 8 : 4, false)); - const MCExpr *Expr = Fixup.getValue(); - auto *SymRef = dyn_cast(Expr); - if (!SymRef) - report_fatal_error("fixups in .init_array should be symbol references"); - const auto &TargetSym = cast(SymRef->getSymbol()); - if (TargetSym.getIndex() == InvalidIndex) - report_fatal_error("symbols in .init_array should exist in symtab"); - if (!TargetSym.isFunction()) - report_fatal_error("symbols in .init_array should be for functions"); - InitFuncs.push_back( - std::make_pair(Priority, TargetSym.getIndex())); + ".init_array section should be aligned for pointers"); + + const MCFragment &Frag = *AlignFrag.getNext(); + nextFrag = Frag.getNext(); + if (Frag.hasInstructions() || Frag.getKind() != MCFragment::FT_Data) + report_fatal_error("only data supported in .init_array section"); + + uint16_t Priority = UINT16_MAX; + unsigned PrefixLength = strlen(".init_array"); + if (WS.getName().size() > PrefixLength) { + if (WS.getName()[PrefixLength] != '.') + report_fatal_error( + ".init_array section priority should start with '.'"); + if (WS.getName().substr(PrefixLength + 1).getAsInteger(10, Priority)) + report_fatal_error("invalid .init_array section priority"); + } + const auto &DataFrag = cast(Frag); + const SmallVectorImpl &Contents = DataFrag.getContents(); + for (const uint8_t * + P = (const uint8_t *)Contents.data(), + *End = (const uint8_t *)Contents.data() + Contents.size(); + P != End; ++P) { + if (*P != 0) + report_fatal_error("non-symbolic data in .init_array section"); + } + for (const MCFixup &Fixup : DataFrag.getFixups()) { + assert(Fixup.getKind() == + MCFixup::getKindForSize(is64Bit() ? 8 : 4, false)); + const MCExpr *Expr = Fixup.getValue(); + auto *SymRef = dyn_cast(Expr); + if (!SymRef) + report_fatal_error( + "fixups in .init_array should be symbol references"); + const auto &TargetSym = cast(SymRef->getSymbol()); + if (TargetSym.getIndex() == InvalidIndex) + report_fatal_error("symbols in .init_array should exist in symtab"); + if (!TargetSym.isFunction()) + report_fatal_error("symbols in .init_array should be for functions"); + InitFuncs.push_back(std::make_pair(Priority, TargetSym.getIndex())); + } } } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1394,6 +1394,18 @@ !MF.getSubtarget().hasSVE(); } +static bool requiresSaveVG(MachineFunction &MF) { + AArch64FunctionInfo *AFI = MF.getInfo(); + // For Darwin platforms we don't save VG for non-SVE functions, even if SME + // is enabled with streaming mode changes. + if (!AFI->hasStreamingModeChanges()) + return false; + auto &ST = MF.getSubtarget(); + if (ST.isTargetDarwin()) + return ST.hasSVE(); + return true; +} + bool isVGInstruction(MachineBasicBlock::iterator MBBI) { unsigned Opc = MBBI->getOpcode(); if (Opc == AArch64::CNTD_XPiI || Opc == AArch64::RDSVLI_XI || @@ -1430,8 +1442,7 @@ // functions, we need to do this for both the streaming and non-streaming // vector length. Move past these instructions if necessary. MachineFunction &MF = *MBB.getParent(); - AArch64FunctionInfo *AFI = MF.getInfo(); - if (AFI->hasStreamingModeChanges()) + if (requiresSaveVG(MF)) while (isVGInstruction(MBBI)) ++MBBI; @@ -1936,12 +1947,9 @@ // pointer bump above. while (MBBI != End && MBBI->getFlag(MachineInstr::FrameSetup) && !IsSVECalleeSave(MBBI)) { - // Move past instructions generated to calculate VG - if (AFI->hasStreamingModeChanges()) - while (isVGInstruction(MBBI)) - ++MBBI; - - if (CombineSPBump) + if (CombineSPBump && + // Only fix-up frame-setup load/store instructions. + (!requiresSaveVG(MF) || !isVGInstruction(MBBI))) fixupCalleeSaveRestoreStackOffset(*MBBI, AFI->getLocalStackSize(), NeedsWinCFI, &HasWinCFI); ++MBBI; @@ -2848,7 +2856,8 @@ return Subtarget.isTargetMachO() && !(Subtarget.getTargetLowering()->supportSwiftError() && Attrs.hasAttrSomewhere(Attribute::SwiftError)) && - MF.getFunction().getCallingConv() != CallingConv::SwiftTail; + MF.getFunction().getCallingConv() != CallingConv::SwiftTail && + !requiresSaveVG(MF); } static bool invalidateWindowsRegisterPairing(unsigned Reg1, unsigned Reg2, @@ -3720,7 +3729,7 @@ // non-streaming VG value. const Function &F = MF.getFunction(); SMEAttrs Attrs(F); - if (AFI->hasStreamingModeChanges()) { + if (requiresSaveVG(MF)) { if (Attrs.hasStreamingBody() && !Attrs.hasStreamingInterface()) CSStackSize += 16; else @@ -3873,7 +3882,7 @@ } // Insert VG into the list of CSRs, immediately before LR if saved. - if (AFI->hasStreamingModeChanges()) { + if (requiresSaveVG(MF)) { std::vector VGSaves; SMEAttrs Attrs(MF.getFunction()); @@ -4602,10 +4611,9 @@ void AArch64FrameLowering::processFunctionBeforeFrameIndicesReplaced( MachineFunction &MF, RegScavenger *RS = nullptr) const { - AArch64FunctionInfo *AFI = MF.getInfo(); for (auto &BB : MF) for (MachineBasicBlock::iterator II = BB.begin(); II != BB.end();) { - if (AFI->hasStreamingModeChanges()) + if (requiresSaveVG(MF)) II = emitVGSaveRestore(II, this); if (StackTaggingMergeSetTag) II = tryMergeAdjacentSTG(II, this, RS); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -8732,10 +8732,11 @@ SDValue InGlue; if (RequiresSMChange) { - - Chain = DAG.getNode(AArch64ISD::VG_SAVE, DL, - DAG.getVTList(MVT::Other, MVT::Glue), Chain); - InGlue = Chain.getValue(1); + if (!Subtarget->isTargetDarwin() || Subtarget->hasSVE()) { + Chain = DAG.getNode(AArch64ISD::VG_SAVE, DL, + DAG.getVTList(MVT::Other, MVT::Glue), Chain); + InGlue = Chain.getValue(1); + } SDValue NewChain = changeStreamingMode( DAG, DL, CalleeAttrs.hasStreamingInterface(), Chain, InGlue, @@ -8914,11 +8915,13 @@ Result = changeStreamingMode( DAG, DL, !CalleeAttrs.hasStreamingInterface(), Result, InGlue, getSMCondition(CallerAttrs, CalleeAttrs), PStateSM); - InGlue = Result.getValue(1); - Result = - DAG.getNode(AArch64ISD::VG_RESTORE, DL, - DAG.getVTList(MVT::Other, MVT::Glue), {Result, InGlue}); + if (!Subtarget->isTargetDarwin() || Subtarget->hasSVE()) { + InGlue = Result.getValue(1); + Result = + DAG.getNode(AArch64ISD::VG_RESTORE, DL, + DAG.getVTList(MVT::Other, MVT::Glue), {Result, InGlue}); + } } if (CallerAttrs.requiresEnablingZAAfterCall(CalleeAttrs)) diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -3796,6 +3796,8 @@ bool HexagonTargetLowering::allowsMemoryAccess( LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace, Align Alignment, MachineMemOperand::Flags Flags, unsigned *Fast) const { + if (!VT.isSimple()) + return false; MVT SVT = VT.getSimpleVT(); if (Subtarget.isHVXVectorType(SVT, true)) return allowsHvxMemoryAccess(SVT, Flags, Fast); @@ -3806,6 +3808,8 @@ bool HexagonTargetLowering::allowsMisalignedMemoryAccesses( EVT VT, unsigned AddrSpace, Align Alignment, MachineMemOperand::Flags Flags, unsigned *Fast) const { + if (!VT.isSimple()) + return false; MVT SVT = VT.getSimpleVT(); if (Subtarget.isHVXVectorType(SVT, true)) return allowsHvxMisalignedMemoryAccesses(SVT, Flags, Fast); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -721,7 +721,7 @@ IsTailCall ? LoongArch::PseudoJIRL_TAIL : LoongArch::PseudoJIRL_CALL; Register AddrReg = IsTailCall ? LoongArch::R19 : LoongArch::R1; - bool UseGOT = Func.isGlobal() && !Func.getGlobal()->isDSOLocal(); + bool UseGOT = Func.getTargetFlags() == LoongArchII::MO_CALL_PLT; unsigned MO = UseGOT ? LoongArchII::MO_GOT_PC_HI : LoongArchII::MO_PCREL_LO; unsigned LAOpcode = UseGOT ? LoongArch::LDX_D : LoongArch::ADD_D; expandLargeAddressLoad(MBB, MBBI, NextMBBI, LAOpcode, MO, Func, AddrReg, diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td --- llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td 2025-01-14 16:29:57.000000000 +0000 @@ -67,8 +67,7 @@ let usesCustomInserter = 1; } -def vsplat_imm_eq_1 : PatFrags<(ops), [(build_vector), - (bitconvert (v4i32 (build_vector)))], [{ +def vsplat_imm_eq_1 : PatFrags<(ops), [(build_vector)], [{ APInt Imm; EVT EltTy = N->getValueType(0).getVectorElementType(); @@ -109,8 +108,7 @@ return selectVSplat(N, Imm, EltTy.getSizeInBits()) && Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 31; }]>; -def vsplati64_imm_eq_63 : PatFrags<(ops), [(build_vector), - (bitconvert (v4i32 (build_vector)))], [{ +def vsplati64_imm_eq_63 : PatFrags<(ops), [(build_vector)], [{ APInt Imm; EVT EltTy = N->getValueType(0).getVectorElementType(); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -55,7 +55,7 @@ static MCSubtargetInfo * createLoongArchMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { if (CPU.empty() || CPU == "generic") - CPU = TT.isArch64Bit() ? "la464" : "generic-la32"; + CPU = TT.isArch64Bit() ? "generic-la64" : "generic-la32"; return createLoongArchMCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS); } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -220,6 +220,10 @@ return false; } +bool MipsDAGToDAGISel::selectVSplatImmEq1(SDValue N) const { + llvm_unreachable("Unimplemented function."); +} + /// Convert vector addition with vector subtraction if that allows to encode /// constant as an immediate and thus avoid extra 'ldi' instruction. /// add X, <-1, -1...> --> sub X, <1, 1...> diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsISelDAGToDAG.h llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsISelDAGToDAG.h --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsISelDAGToDAG.h 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsISelDAGToDAG.h 2025-01-14 16:29:57.000000000 +0000 @@ -120,6 +120,9 @@ /// starting at bit zero. virtual bool selectVSplatMaskR(SDValue N, SDValue &Imm) const; + /// Select constant vector splats whose value is 1. + virtual bool selectVSplatImmEq1(SDValue N) const; + /// Convert vector addition with vector subtraction if that allows to encode /// constant as an immediate and thus avoid extra 'ldi' instruction. /// add X, <-1, -1...> --> sub X, <1, 1...> diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsMSAInstrInfo.td llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsMSAInstrInfo.td --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsMSAInstrInfo.td 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsMSAInstrInfo.td 2025-01-14 16:29:57.000000000 +0000 @@ -198,14 +198,8 @@ (v4i32 (build_vector node:$e0, node:$e0, node:$e0, node:$e0))>; -def vsplati64_imm_eq_1 : PatLeaf<(bitconvert (v4i32 (build_vector))), [{ - APInt Imm; - SDNode *BV = N->getOperand(0).getNode(); - EVT EltTy = N->getValueType(0).getVectorElementType(); - - return selectVSplat(BV, Imm, EltTy.getSizeInBits()) && - Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1; -}]>; +// Any build_vector that is a constant splat with a value that equals 1 +def vsplat_imm_eq_1 : ComplexPattern; def vsplati64 : PatFrag<(ops node:$e0), (v2i64 (build_vector node:$e0, node:$e0))>; @@ -217,7 +211,7 @@ node:$e0, node:$e0, node:$e0)), - vsplati64_imm_eq_1))))>; + (vsplat_imm_eq_1)))))>; def vsplatf32 : PatFrag<(ops node:$e0), (v4f32 (build_vector node:$e0, node:$e0, @@ -352,46 +346,35 @@ : SplatComplexPattern; -// Any build_vector that is a constant splat with a value that equals 1 -// FIXME: These should be a ComplexPattern but we can't use them because the -// ISel generator requires the uses to have a name, but providing a name -// causes other errors ("used in pattern but not operand list") -def vsplat_imm_eq_1 : PatLeaf<(build_vector), [{ - APInt Imm; - EVT EltTy = N->getValueType(0).getVectorElementType(); - - return selectVSplat(N, Imm, EltTy.getSizeInBits()) && - Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1; -}]>; def vbclr_b : PatFrag<(ops node:$ws, node:$wt), - (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>; + (and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>; def vbclr_h : PatFrag<(ops node:$ws, node:$wt), - (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>; + (and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>; def vbclr_w : PatFrag<(ops node:$ws, node:$wt), - (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>; + (and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>; def vbclr_d : PatFrag<(ops node:$ws, node:$wt), - (and node:$ws, (vnot (shl (v2i64 vsplati64_imm_eq_1), + (and node:$ws, (vnot (shl (v2i64 (vsplat_imm_eq_1)), node:$wt)))>; def vbneg_b : PatFrag<(ops node:$ws, node:$wt), - (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbneg_h : PatFrag<(ops node:$ws, node:$wt), - (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbneg_w : PatFrag<(ops node:$ws, node:$wt), - (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbneg_d : PatFrag<(ops node:$ws, node:$wt), - (xor node:$ws, (shl (v2i64 vsplati64_imm_eq_1), + (xor node:$ws, (shl (v2i64 (vsplat_imm_eq_1)), node:$wt))>; def vbset_b : PatFrag<(ops node:$ws, node:$wt), - (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbset_h : PatFrag<(ops node:$ws, node:$wt), - (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbset_w : PatFrag<(ops node:$ws, node:$wt), - (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>; + (or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>; def vbset_d : PatFrag<(ops node:$ws, node:$wt), - (or node:$ws, (shl (v2i64 vsplati64_imm_eq_1), + (or node:$ws, (shl (v2i64 (vsplat_imm_eq_1)), node:$wt))>; def muladd : PatFrag<(ops node:$wd, node:$ws, node:$wt), @@ -3842,7 +3825,7 @@ (VT (Insn VT:$ws, VT:$wt))>; class MSABitPat : - MSAPat<(VT (Node VT:$ws, (shl vsplat_imm_eq_1, (Frag VT:$wt)))), + MSAPat<(VT (Node VT:$ws, (shl (vsplat_imm_eq_1), (Frag VT:$wt)))), (VT (Insn VT:$ws, VT:$wt))>; multiclass MSAShiftPats { @@ -3861,7 +3844,7 @@ def : MSABitPat(Insn#_B), vsplati8imm7>; def : MSABitPat(Insn#_H), vsplati16imm15>; def : MSABitPat(Insn#_W), vsplati32imm31>; - def : MSAPat<(Node v2i64:$ws, (shl (v2i64 vsplati64_imm_eq_1), + def : MSAPat<(Node v2i64:$ws, (shl (v2i64 (vsplat_imm_eq_1)), (vsplati64imm63 v2i64:$wt))), (v2i64 (!cast(Insn#_D) v2i64:$ws, v2i64:$wt))>; } @@ -3872,16 +3855,16 @@ defm : MSABitPats; defm : MSABitPats; -def : MSAPat<(and v16i8:$ws, (vnot (shl vsplat_imm_eq_1, +def : MSAPat<(and v16i8:$ws, (vnot (shl (vsplat_imm_eq_1), (vsplati8imm7 v16i8:$wt)))), (v16i8 (BCLR_B v16i8:$ws, v16i8:$wt))>; -def : MSAPat<(and v8i16:$ws, (vnot (shl vsplat_imm_eq_1, +def : MSAPat<(and v8i16:$ws, (vnot (shl (vsplat_imm_eq_1), (vsplati16imm15 v8i16:$wt)))), (v8i16 (BCLR_H v8i16:$ws, v8i16:$wt))>; -def : MSAPat<(and v4i32:$ws, (vnot (shl vsplat_imm_eq_1, +def : MSAPat<(and v4i32:$ws, (vnot (shl (vsplat_imm_eq_1), (vsplati32imm31 v4i32:$wt)))), (v4i32 (BCLR_W v4i32:$ws, v4i32:$wt))>; -def : MSAPat<(and v2i64:$ws, (vnot (shl (v2i64 vsplati64_imm_eq_1), +def : MSAPat<(and v2i64:$ws, (vnot (shl (v2i64 (vsplat_imm_eq_1)), (vsplati64imm63 v2i64:$wt)))), (v2i64 (BCLR_D v2i64:$ws, v2i64:$wt))>; diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -730,6 +730,18 @@ return false; } +// Select const vector splat of 1. +bool MipsSEDAGToDAGISel::selectVSplatImmEq1(SDValue N) const { + APInt ImmValue; + EVT EltTy = N->getValueType(0).getVectorElementType(); + + if (N->getOpcode() == ISD::BITCAST) + N = N->getOperand(0); + + return selectVSplat(N.getNode(), ImmValue, EltTy.getSizeInBits()) && + ImmValue.getBitWidth() == EltTy.getSizeInBits() && ImmValue == 1; +} + bool MipsSEDAGToDAGISel::trySelect(SDNode *Node) { unsigned Opcode = Node->getOpcode(); SDLoc DL(Node); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h --- llvm-toolchain-19-19.1.4/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h 2025-01-14 16:29:57.000000000 +0000 @@ -124,6 +124,9 @@ /// starting at bit zero. bool selectVSplatMaskR(SDValue N, SDValue &Imm) const override; + /// Select constant vector splats whose value is 1. + bool selectVSplatImmEq1(SDValue N) const override; + bool trySelect(SDNode *Node) override; // Emits proper ABI for _mcount profiling calls. diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -229,6 +229,10 @@ // v*i8 are formally lowered as v4i8 EltVT = MVT::v4i8; NumElts = (NumElts + 3) / 4; + } else if (EltVT.getSimpleVT() == MVT::i8 && NumElts == 2) { + // v2i8 is promoted to v2i16 + NumElts = 1; + EltVT = MVT::v2i16; } for (unsigned j = 0; j != NumElts; ++j) { ValueVTs.push_back(EltVT); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVISelLowering.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVISelLowering.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVISelLowering.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1396,8 +1396,9 @@ } // Custom-legalize bitcasts from fixed-length vectors to scalar types. - setOperationAction(ISD::BITCAST, {MVT::i8, MVT::i16, MVT::i32, MVT::i64}, - Custom); + setOperationAction(ISD::BITCAST, {MVT::i8, MVT::i16, MVT::i32}, Custom); + if (Subtarget.is64Bit()) + setOperationAction(ISD::BITCAST, MVT::i64, Custom); if (Subtarget.hasStdExtZfhminOrZhinxmin()) setOperationAction(ISD::BITCAST, MVT::f16, Custom); if (Subtarget.hasStdExtFOrZfinx()) @@ -6317,7 +6318,8 @@ DAG.getNode(RISCVISD::FMV_W_X_RV64, DL, MVT::f32, NewOp0); return FPConv; } - if (VT == MVT::f64 && Op0VT == MVT::i64 && XLenVT == MVT::i32) { + if (VT == MVT::f64 && Op0VT == MVT::i64 && !Subtarget.is64Bit() && + Subtarget.hasStdExtDOrZdinx()) { SDValue Lo, Hi; std::tie(Lo, Hi) = DAG.SplitScalar(Op0, DL, MVT::i32, MVT::i32); SDValue RetReg = @@ -12616,7 +12618,8 @@ SDValue FPConv = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Op0); Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, FPConv)); - } else if (VT == MVT::i64 && Op0VT == MVT::f64 && XLenVT == MVT::i32) { + } else if (VT == MVT::i64 && Op0VT == MVT::f64 && !Subtarget.is64Bit() && + Subtarget.hasStdExtDOrZdinx()) { SDValue NewReg = DAG.getNode(RISCVISD::SplitF64, DL, DAG.getVTList(MVT::i32, MVT::i32), Op0); SDValue RetReg = DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i64, diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp 2024-11-26 09:13:20.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -2536,6 +2536,13 @@ } } + if (int Idx = RISCVII::getFRMOpNum(Desc); + Idx >= 0 && MI.getOperand(Idx).getImm() == RISCVFPRndMode::DYN && + !MI.readsRegister(RISCV::FRM, /*TRI=*/nullptr)) { + ErrInfo = "dynamic rounding mode should read FRM"; + return false; + } + return true; } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td --- llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td 2025-01-14 16:29:57.000000000 +0000 @@ -6471,7 +6471,7 @@ //===----------------------------------------------------------------------===// // 13.5. Vector Widening Floating-Point Multiply //===----------------------------------------------------------------------===// -let mayRaiseFPException = true, hasSideEffects = 0 in { +let mayRaiseFPException = true, hasSideEffects = 0, hasPostISelHook = 1 in { defm PseudoVFWMUL : VPseudoVWMUL_VV_VF_RM; } @@ -6504,7 +6504,7 @@ //===----------------------------------------------------------------------===// // 13.8. Vector Floating-Point Square-Root Instruction //===----------------------------------------------------------------------===// -let mayRaiseFPException = true, hasSideEffects = 0 in +let mayRaiseFPException = true, hasSideEffects = 0, hasPostISelHook = 1 in defm PseudoVFSQRT : VPseudoVSQR_V_RM; //===----------------------------------------------------------------------===// @@ -6516,7 +6516,7 @@ //===----------------------------------------------------------------------===// // 13.10. Vector Floating-Point Reciprocal Estimate Instruction //===----------------------------------------------------------------------===// -let mayRaiseFPException = true, hasSideEffects = 0 in +let mayRaiseFPException = true, hasSideEffects = 0, hasPostISelHook = 1 in defm PseudoVFREC7 : VPseudoVRCP_V_RM; //===----------------------------------------------------------------------===// @@ -6627,9 +6627,10 @@ defm PseudoVFNCVT_RM_F_XU : VPseudoVNCVTF_RM_W; defm PseudoVFNCVT_RM_F_X : VPseudoVNCVTF_RM_W; -let hasSideEffects = 0, hasPostISelHook = 1 in +let hasSideEffects = 0, hasPostISelHook = 1 in { defm PseudoVFNCVT_F_F : VPseudoVNCVTD_W_RM; defm PseudoVFNCVTBF16_F_F : VPseudoVNCVTD_W_RM; +} defm PseudoVFNCVT_ROD_F_F : VPseudoVNCVTD_W; } // mayRaiseFPException = true @@ -6665,8 +6666,7 @@ //===----------------------------------------------------------------------===// // 14.3. Vector Single-Width Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// -let mayRaiseFPException = true, - hasSideEffects = 0 in { +let mayRaiseFPException = true, hasSideEffects = 0, hasPostISelHook = 1 in { defm PseudoVFREDOSUM : VPseudoVFREDO_VS_RM; defm PseudoVFREDUSUM : VPseudoVFRED_VS_RM; } @@ -6678,9 +6678,8 @@ //===----------------------------------------------------------------------===// // 14.4. Vector Widening Floating-Point Reduction Instructions //===----------------------------------------------------------------------===// -let IsRVVWideningReduction = 1, - hasSideEffects = 0, - mayRaiseFPException = true in { +let IsRVVWideningReduction = 1, hasSideEffects = 0, mayRaiseFPException = true, + hasPostISelHook = 1 in { defm PseudoVFWREDUSUM : VPseudoVFWRED_VS_RM; defm PseudoVFWREDOSUM : VPseudoVFWREDO_VS_RM; } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td --- llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td 2025-01-14 16:29:57.000000000 +0000 @@ -694,7 +694,7 @@ def : CVStriPat; def : CVStrriPat; - def : CVStrriPat; + def : CVStrriPat; def : CVStrriPat; def : CVStrrPat; diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td --- llvm-toolchain-19-19.1.4/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td 2025-01-14 16:29:57.000000000 +0000 @@ -217,7 +217,8 @@ def VFWMACC_4x4x4 : CustomSiFiveVMACC<0b111100, OPFVV, "sf.vfwmacc.4x4x4">; } -let Predicates = [HasVendorXSfvfnrclipxfqf], DecoderNamespace = "XSfvfnrclipxfqf" in { +let Predicates = [HasVendorXSfvfnrclipxfqf], DecoderNamespace = "XSfvfnrclipxfqf", + Uses = [FRM] in { def VFNRCLIP_XU_F_QF : CustomSiFiveVFNRCLIP<0b100010, OPFVF, "sf.vfnrclip.xu.f.qf">; def VFNRCLIP_X_F_QF : CustomSiFiveVFNRCLIP<0b100011, OPFVF, "sf.vfnrclip.x.f.qf">; } @@ -399,7 +400,7 @@ multiclass VPseudoSiFiveVFNRCLIP { foreach i = 0-4 in - let hasSideEffects = 0 in + let hasSideEffects = 0, hasPostISelHook = 1 in defm "Pseudo" # NAME : VPseudoBinaryRoundingModegetType()), 0); Load1Ptr = Load1Ptr->stripAndAccumulateConstantOffsets( DL, Offset1, /* AllowNonInbounds */ true); - Load1Ptr = Builder.CreatePtrAdd(Load1Ptr, - Builder.getInt32(Offset1.getZExtValue())); + Load1Ptr = Builder.CreatePtrAdd(Load1Ptr, Builder.getInt(Offset1)); } // Generate wider load. NewLoad = Builder.CreateAlignedLoad(WiderType, Load1Ptr, LI1->getAlign(), diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -506,8 +506,10 @@ // If ctlz/cttz is only used as a shift amount, set is_zero_poison to true. if (II.hasOneUse() && match(Op1, m_Zero()) && - match(II.user_back(), m_Shift(m_Value(), m_Specific(&II)))) + match(II.user_back(), m_Shift(m_Value(), m_Specific(&II)))) { + II.dropUBImplyingAttrsAndMetadata(); return IC.replaceOperand(II, 1, IC.Builder.getTrue()); + } Constant *C; diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1004,7 +1004,7 @@ uint64_t MaskedGEPIndex = HighBitsGEPIndex | MaskedLowBitsGEPIndex; if (MaskedGEPIndex != GEPIndex) { - auto *GEP = cast(II->getArgOperand(0)); + auto *GEP = cast(II->getArgOperand(0)); Builder.SetInsertPoint(I); Type *GEPIndexType = DL.getIndexType(GEP->getPointerOperand()->getType()); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1033,9 +1033,9 @@ DTN, CmpInst::ICMP_SLT, PN, B, ConditionTy(CmpInst::ICMP_SLE, StartValue, B))); - // Try to add condition from header to the exit blocks. When exiting either - // with EQ or NE in the header, we know that the induction value must be u<= - // B, as other exits may only exit earlier. + // Try to add condition from header to the dedicated exit blocks. When exiting + // either with EQ or NE in the header, we know that the induction value must + // be u<= B, as other exits may only exit earlier. assert(!StepOffset.isNegative() && "induction must be increasing"); assert((Pred == CmpInst::ICMP_EQ || Pred == CmpInst::ICMP_NE) && "unsupported predicate"); @@ -1043,8 +1043,11 @@ SmallVector ExitBBs; L->getExitBlocks(ExitBBs); for (BasicBlock *EB : ExitBBs) { - WorkList.emplace_back(FactOrCheck::getConditionFact( - DT.getNode(EB), CmpInst::ICMP_ULE, A, B, Precond)); + // Bail out on non-dedicated exits. + if (DT.dominates(&BB, EB)) { + WorkList.emplace_back(FactOrCheck::getConditionFact( + DT.getNode(EB), CmpInst::ICMP_ULE, A, B, Precond)); + } } } diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/LICM.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/LICM.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/LICM.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/LICM.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1464,8 +1464,11 @@ if (MSSAU.getMemorySSA()->getMemoryAccess(&I)) { // Create a new MemoryAccess and let MemorySSA set its defining access. + // After running some passes, MemorySSA might be outdated, and the + // instruction `I` may have become a non-memory touching instruction. MemoryAccess *NewMemAcc = MSSAU.createMemoryAccessInBB( - New, nullptr, New->getParent(), MemorySSA::Beginning); + New, nullptr, New->getParent(), MemorySSA::Beginning, + /*CreationMustSucceed=*/false); if (NewMemAcc) { if (auto *MemDef = dyn_cast(NewMemAcc)) MSSAU.insertDef(MemDef, /*RenameUses=*/true); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1249,8 +1249,9 @@ assert(VMap.lookup(&I) == &ClonedI && "Mismatch in the value map!"); // Forget SCEVs based on exit phis in case SCEV looked through the phi. - if (SE && isa(I)) - SE->forgetValue(&I); + if (SE) + if (auto *PN = dyn_cast(&I)) + SE->forgetLcssaPhiWithNewPredecessor(&L, PN); BasicBlock::iterator InsertPt = MergeBB->getFirstInsertionPt(); diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Utils/Local.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Utils/Local.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Utils/Local.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Utils/Local.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -1028,7 +1028,13 @@ if (!BB->hasNPredecessorsOrMore(2)) return false; - // Get single common predecessors of both BB and Succ + if (any_of(BBPreds, [](const BasicBlock *Pred) { + return isa(Pred->getTerminator()); + })) + return false; + + // Get the single common predecessor of both BB and Succ. Return false + // when there are more than one common predecessors. for (BasicBlock *SuccPred : SuccPreds) { if (BBPreds.count(SuccPred)) { if (CommonPred) @@ -1133,7 +1139,7 @@ bool BBKillable = CanPropagatePredecessorsForPHIs(BB, Succ, BBPreds); - // Even if we can not fold bB into Succ, we may be able to redirect the + // Even if we can not fold BB into Succ, we may be able to redirect the // predecessors of BB to Succ. bool BBPhisMergeable = BBKillable || diff -Nru llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp --- llvm-toolchain-19-19.1.4/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp 2025-01-14 16:29:57.000000000 +0000 @@ -15440,9 +15440,25 @@ MaskedValueIsZero(I->getOperand(1), Mask, SimplifyQuery(*DL))); }); }; + auto AbsChecker = [&](unsigned BitWidth, unsigned OrigBitWidth) { + assert(BitWidth <= OrigBitWidth && "Unexpected bitwidths!"); + return all_of(E.Scalars, [&](Value *V) { + auto *I = cast(V); + unsigned SignBits = OrigBitWidth - BitWidth; + APInt Mask = APInt::getBitsSetFrom(OrigBitWidth, BitWidth - 1); + unsigned Op0SignBits = + ComputeNumSignBits(I->getOperand(0), *DL, 0, AC, nullptr, DT); + return SignBits <= Op0SignBits && + ((SignBits != Op0SignBits && + !isKnownNonNegative(I->getOperand(0), SimplifyQuery(*DL))) || + MaskedValueIsZero(I->getOperand(0), Mask, SimplifyQuery(*DL))); + }); + }; if (ID != Intrinsic::abs) { Operands.push_back(getOperandEntry(&E, 1)); CallChecker = CompChecker; + } else { + CallChecker = AbsChecker; } InstructionCost BestCost = std::numeric_limits::max(); @@ -18580,8 +18596,11 @@ if (R.isDeleted(I)) continue; for (Value *Op : I->operands()) - if (auto *RootOp = dyn_cast(Op)) + if (auto *RootOp = dyn_cast(Op)) { Changed |= vectorizeRootInstruction(nullptr, RootOp, BB, R, TTI); + if (R.isDeleted(I)) + break; + } } // Try to vectorize operands as vector bundles. for (CmpInst *I : CmpInsts) { diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Analysis/ScalarEvolution/pr116483.ll llvm-toolchain-19-19.1.7/llvm/test/Analysis/ScalarEvolution/pr116483.ll --- llvm-toolchain-19-19.1.4/llvm/test/Analysis/ScalarEvolution/pr116483.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Analysis/ScalarEvolution/pr116483.ll 2024-12-03 22:44:49.000000000 +0000 @@ -0,0 +1,26 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -disable-output "-passes=print" < %s 2>&1 | FileCheck %s + +define i16 @test() { +; CHECK-LABEL: 'test' +; CHECK-NEXT: Classifying expressions for: @test +; CHECK-NEXT: %xor = xor i32 0, 3 +; CHECK-NEXT: --> %xor U: [3,4) S: [3,4) +; CHECK-NEXT: %mul = mul i32 %xor, 329 +; CHECK-NEXT: --> (329 * %xor) U: [987,988) S: [987,988) +; CHECK-NEXT: %conv = trunc i32 %mul to i16 +; CHECK-NEXT: --> (329 * (trunc i32 %xor to i16)) U: [987,988) S: [987,988) +; CHECK-NEXT: %sext = shl i16 %conv, 8 +; CHECK-NEXT: --> (18688 * (trunc i32 %xor to i16)) U: [-9472,-9471) S: [-9472,-9471) +; CHECK-NEXT: %conv1 = ashr i16 %sext, 8 +; CHECK-NEXT: --> (sext i8 (73 * (trunc i32 %xor to i8)) to i16) U: [-37,-36) S: [-37,-36) +; CHECK-NEXT: Determining loop execution counts for: @test +; +entry: + %xor = xor i32 0, 3 + %mul = mul i32 %xor, 329 + %conv = trunc i32 %mul to i16 + %sext = shl i16 %conv, 8 + %conv1 = ashr i16 %sext, 8 + ret i16 %conv1 +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/machine-licm-hoist-load.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/machine-licm-hoist-load.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/machine-licm-hoist-load.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/machine-licm-hoist-load.ll 2025-01-14 16:29:57.000000000 +0000 @@ -497,6 +497,35 @@ ret i64 %spec.select } +@a = external local_unnamed_addr global i32, align 4 + +; Make sure the load is not hoisted out of the loop across memory barriers. +define i32 @load_between_memory_barriers() { +; CHECK-LABEL: load_between_memory_barriers: +; CHECK: // %bb.0: +; CHECK-NEXT: adrp x8, :got:a +; CHECK-NEXT: ldr x8, [x8, :got_lo12:a] +; CHECK-NEXT: .LBB8_1: // %loop +; CHECK-NEXT: // =>This Inner Loop Header: Depth=1 +; CHECK-NEXT: //MEMBARRIER +; CHECK-NEXT: ldr w0, [x8] +; CHECK-NEXT: //MEMBARRIER +; CHECK-NEXT: cbz w0, .LBB8_1 +; CHECK-NEXT: // %bb.2: // %exit +; CHECK-NEXT: ret + br label %loop + +loop: + fence syncscope("singlethread") acq_rel + %l = load i32, ptr @a, align 4 + fence syncscope("singlethread") acq_rel + %c = icmp eq i32 %l, 0 + br i1 %c, label %loop, label %exit + +exit: + ret i32 %l +} + declare i32 @bcmp(ptr, ptr, i64) declare i32 @memcmp(ptr, ptr, i64) declare void @func() diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-darwin-no-sve-vg.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-darwin-no-sve-vg.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-darwin-no-sve-vg.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-darwin-no-sve-vg.ll 2024-12-03 22:44:49.000000000 +0000 @@ -0,0 +1,161 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -o - %s | FileCheck %s +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128-Fn32" +target triple = "arm64-apple-macosx14.0.0" + +; Check we don't crash on Darwin and that we don't try to save VG +; when only SME (and not SVE) is enabled. + +; Function Attrs: mustprogress norecurse nounwind ssp uwtable(sync) +define noundef i32 @main() local_unnamed_addr #0 { +; CHECK-LABEL: main: +; CHECK: ; %bb.0: ; %entry +; CHECK-NEXT: stp d15, d14, [sp, #-80]! ; 16-byte Folded Spill +; CHECK-NEXT: .cfi_def_cfa_offset 80 +; CHECK-NEXT: stp d13, d12, [sp, #16] ; 16-byte Folded Spill +; CHECK-NEXT: stp d11, d10, [sp, #32] ; 16-byte Folded Spill +; CHECK-NEXT: stp d9, d8, [sp, #48] ; 16-byte Folded Spill +; CHECK-NEXT: stp x29, x30, [sp, #64] ; 16-byte Folded Spill +; CHECK-NEXT: .cfi_offset w30, -8 +; CHECK-NEXT: .cfi_offset w29, -16 +; CHECK-NEXT: .cfi_offset b8, -24 +; CHECK-NEXT: .cfi_offset b9, -32 +; CHECK-NEXT: .cfi_offset b10, -40 +; CHECK-NEXT: .cfi_offset b11, -48 +; CHECK-NEXT: .cfi_offset b12, -56 +; CHECK-NEXT: .cfi_offset b13, -64 +; CHECK-NEXT: .cfi_offset b14, -72 +; CHECK-NEXT: .cfi_offset b15, -80 +; CHECK-NEXT: smstart sm +; CHECK-NEXT: bl __ZL9sme_crashv +; CHECK-NEXT: smstop sm +; CHECK-NEXT: mov w0, #0 ; =0x0 +; CHECK-NEXT: ldp x29, x30, [sp, #64] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d9, d8, [sp, #48] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d11, d10, [sp, #32] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d13, d12, [sp, #16] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d15, d14, [sp], #80 ; 16-byte Folded Reload +; CHECK-NEXT: .cfi_def_cfa_offset 0 +; CHECK-NEXT: .cfi_restore w30 +; CHECK-NEXT: .cfi_restore w29 +; CHECK-NEXT: .cfi_restore b8 +; CHECK-NEXT: .cfi_restore b9 +; CHECK-NEXT: .cfi_restore b10 +; CHECK-NEXT: .cfi_restore b11 +; CHECK-NEXT: .cfi_restore b12 +; CHECK-NEXT: .cfi_restore b13 +; CHECK-NEXT: .cfi_restore b14 +; CHECK-NEXT: .cfi_restore b15 +; CHECK-NEXT: ret +entry: + tail call fastcc void @_ZL9sme_crashv() #4 + ret i32 0 +} + +; Function Attrs: mustprogress norecurse nounwind ssp uwtable(sync) +define internal fastcc void @_ZL9sme_crashv() unnamed_addr #1 { +; CHECK-LABEL: _ZL9sme_crashv: +; CHECK: ; %bb.0: ; %entry +; CHECK-NEXT: stp d15, d14, [sp, #-96]! ; 16-byte Folded Spill +; CHECK-NEXT: .cfi_def_cfa_offset 96 +; CHECK-NEXT: stp d13, d12, [sp, #16] ; 16-byte Folded Spill +; CHECK-NEXT: stp d11, d10, [sp, #32] ; 16-byte Folded Spill +; CHECK-NEXT: stp d9, d8, [sp, #48] ; 16-byte Folded Spill +; CHECK-NEXT: stp x28, x27, [sp, #64] ; 16-byte Folded Spill +; CHECK-NEXT: stp x29, x30, [sp, #80] ; 16-byte Folded Spill +; CHECK-NEXT: add x29, sp, #80 +; CHECK-NEXT: .cfi_def_cfa w29, 16 +; CHECK-NEXT: .cfi_offset w30, -8 +; CHECK-NEXT: .cfi_offset w29, -16 +; CHECK-NEXT: .cfi_offset w27, -24 +; CHECK-NEXT: .cfi_offset w28, -32 +; CHECK-NEXT: .cfi_offset b8, -40 +; CHECK-NEXT: .cfi_offset b9, -48 +; CHECK-NEXT: .cfi_offset b10, -56 +; CHECK-NEXT: .cfi_offset b11, -64 +; CHECK-NEXT: .cfi_offset b12, -72 +; CHECK-NEXT: .cfi_offset b13, -80 +; CHECK-NEXT: .cfi_offset b14, -88 +; CHECK-NEXT: .cfi_offset b15, -96 +; CHECK-NEXT: .cfi_remember_state +; CHECK-NEXT: sub x9, sp, #160 +; CHECK-NEXT: and sp, x9, #0xffffffffffffff00 +; CHECK-NEXT: Lloh0: +; CHECK-NEXT: adrp x8, ___stack_chk_guard@GOTPAGE +; CHECK-NEXT: Lloh1: +; CHECK-NEXT: ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] +; CHECK-NEXT: Lloh2: +; CHECK-NEXT: ldr x8, [x8] +; CHECK-NEXT: str x8, [sp, #152] +; CHECK-NEXT: mov z0.b, #0 ; =0x0 +; CHECK-NEXT: stp q0, q0, [sp, #32] +; CHECK-NEXT: stp q0, q0, [sp] +; CHECK-NEXT: mov x8, sp +; CHECK-NEXT: ; InlineAsm Start +; CHECK-NEXT: ptrue p0.s +; CHECK-NEXT: st1w { z0.s }, p0, [x8] +; CHECK-EMPTY: +; CHECK-NEXT: ; InlineAsm End +; CHECK-NEXT: ldr x8, [sp, #152] +; CHECK-NEXT: Lloh3: +; CHECK-NEXT: adrp x9, ___stack_chk_guard@GOTPAGE +; CHECK-NEXT: Lloh4: +; CHECK-NEXT: ldr x9, [x9, ___stack_chk_guard@GOTPAGEOFF] +; CHECK-NEXT: Lloh5: +; CHECK-NEXT: ldr x9, [x9] +; CHECK-NEXT: cmp x9, x8 +; CHECK-NEXT: b.ne LBB1_2 +; CHECK-NEXT: ; %bb.1: ; %entry +; CHECK-NEXT: sub sp, x29, #80 +; CHECK-NEXT: .cfi_def_cfa wsp, 96 +; CHECK-NEXT: ldp x29, x30, [sp, #80] ; 16-byte Folded Reload +; CHECK-NEXT: ldp x28, x27, [sp, #64] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d9, d8, [sp, #48] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d11, d10, [sp, #32] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d13, d12, [sp, #16] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d15, d14, [sp], #96 ; 16-byte Folded Reload +; CHECK-NEXT: .cfi_def_cfa_offset 0 +; CHECK-NEXT: .cfi_restore w30 +; CHECK-NEXT: .cfi_restore w29 +; CHECK-NEXT: .cfi_restore w27 +; CHECK-NEXT: .cfi_restore w28 +; CHECK-NEXT: .cfi_restore b8 +; CHECK-NEXT: .cfi_restore b9 +; CHECK-NEXT: .cfi_restore b10 +; CHECK-NEXT: .cfi_restore b11 +; CHECK-NEXT: .cfi_restore b12 +; CHECK-NEXT: .cfi_restore b13 +; CHECK-NEXT: .cfi_restore b14 +; CHECK-NEXT: .cfi_restore b15 +; CHECK-NEXT: ret +; CHECK-NEXT: LBB1_2: ; %entry +; CHECK-NEXT: .cfi_restore_state +; CHECK-NEXT: smstop sm +; CHECK-NEXT: bl ___stack_chk_fail +; CHECK-NEXT: smstart sm +; CHECK-NEXT: .loh AdrpLdrGotLdr Lloh3, Lloh4, Lloh5 +; CHECK-NEXT: .loh AdrpLdrGotLdr Lloh0, Lloh1, Lloh2 +entry: + %uu = alloca [16 x float], align 256 + call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %uu) #5 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 256 dereferenceable(64) %uu, i8 0, i64 64, i1 false) + call void asm sideeffect "ptrue p0.s\0Ast1w { z0.s }, p0, [$0]\0A", "r"(ptr nonnull %uu) #5 + call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %uu) #5 + ret void +} + +; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 + +; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 + +; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 + +attributes #0 = { mustprogress norecurse nounwind ssp uwtable(sync) "stack-protector-buffer-size"="8" "target-cpu"="apple-a16" "target-features"="+sme,+sme-f64f64,+sme2" } +attributes #1 = { mustprogress norecurse nounwind ssp uwtable(sync) "aarch64_pstate_sm_enabled" "stack-protector-buffer-size"="8" "target-cpu"="apple-a16" "target-features"="+sme,+sme-f64f64,+sme2" } +attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #4 = { "aarch64_pstate_sm_enabled" "no-builtin-calloc" "no-builtin-stpcpy" } +attributes #5 = { nounwind } diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-darwin-sve-vg.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-darwin-sve-vg.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-darwin-sve-vg.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-darwin-sve-vg.ll 2025-01-14 16:29:57.000000000 +0000 @@ -0,0 +1,55 @@ +; RUN: llc -mtriple=aarch64-darwin -mattr=+sve -mattr=+sme -verify-machineinstrs < %s | FileCheck %s + +declare void @normal_callee(); + +define void @locally_streaming_fn() #0 { +; CHECK-LABEL: locally_streaming_fn: +; CHECK: ; %bb.0: +; CHECK-NEXT: stp d15, d14, [sp, #-96]! ; 16-byte Folded Spill +; CHECK-NEXT: .cfi_def_cfa_offset 96 +; CHECK-NEXT: rdsvl x9, #1 +; CHECK-NEXT: stp d13, d12, [sp, #16] ; 16-byte Folded Spill +; CHECK-NEXT: lsr x9, x9, #3 +; CHECK-NEXT: stp d11, d10, [sp, #32] ; 16-byte Folded Spill +; CHECK-NEXT: stp d9, d8, [sp, #48] ; 16-byte Folded Spill +; CHECK-NEXT: stp x30, x9, [sp, #64] ; 16-byte Folded Spill +; CHECK-NEXT: cntd x9 +; CHECK-NEXT: str x9, [sp, #80] ; 8-byte Folded Spill +; CHECK-NEXT: .cfi_offset vg, -16 +; CHECK-NEXT: .cfi_offset w30, -32 +; CHECK-NEXT: .cfi_offset b8, -40 +; CHECK-NEXT: .cfi_offset b9, -48 +; CHECK-NEXT: .cfi_offset b10, -56 +; CHECK-NEXT: .cfi_offset b11, -64 +; CHECK-NEXT: .cfi_offset b12, -72 +; CHECK-NEXT: .cfi_offset b13, -80 +; CHECK-NEXT: .cfi_offset b14, -88 +; CHECK-NEXT: .cfi_offset b15, -96 +; CHECK-NEXT: smstart sm +; CHECK-NEXT: .cfi_offset vg, -24 +; CHECK-NEXT: smstop sm +; CHECK-NEXT: bl _normal_callee +; CHECK-NEXT: smstart sm +; CHECK-NEXT: .cfi_restore vg +; CHECK-NEXT: smstop sm +; CHECK-NEXT: ldp d9, d8, [sp, #48] ; 16-byte Folded Reload +; CHECK-NEXT: ldr x30, [sp, #64] ; 8-byte Folded Reload +; CHECK-NEXT: ldp d11, d10, [sp, #32] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d13, d12, [sp, #16] ; 16-byte Folded Reload +; CHECK-NEXT: ldp d15, d14, [sp], #96 ; 16-byte Folded Reload +; CHECK-NEXT: .cfi_def_cfa_offset 0 +; CHECK-NEXT: .cfi_restore w30 +; CHECK-NEXT: .cfi_restore b8 +; CHECK-NEXT: .cfi_restore b9 +; CHECK-NEXT: .cfi_restore b10 +; CHECK-NEXT: .cfi_restore b11 +; CHECK-NEXT: .cfi_restore b12 +; CHECK-NEXT: .cfi_restore b13 +; CHECK-NEXT: .cfi_restore b14 +; CHECK-NEXT: .cfi_restore b15 +; CHECK-NEXT: ret + call void @normal_callee() + ret void +} + +attributes #0 = { "aarch64_pstate_sm_body" uwtable(async) } diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-vg-to-stack.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-vg-to-stack.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/AArch64/sme-vg-to-stack.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/AArch64/sme-vg-to-stack.ll 2025-01-14 16:29:57.000000000 +0000 @@ -1102,6 +1102,44 @@ ret void } +; The algorithm that fixes up the offsets of the callee-save/restore +; instructions must jump over the instructions that instantiate the current +; 'VG' value. We must make sure that it doesn't consider any RDSVL in +; user-code as if it is part of the frame-setup when doing so. +define void @test_rdsvl_right_after_prologue(i64 %x0) nounwind { +; NO-SVE-CHECK-LABEL: test_rdsvl_right_after_prologue: +; NO-SVE-CHECK: // %bb.0: +; NO-SVE-CHECK-NEXT: stp d15, d14, [sp, #-96]! // 16-byte Folded Spill +; NO-SVE-CHECK-NEXT: stp d13, d12, [sp, #16] // 16-byte Folded Spill +; NO-SVE-CHECK-NEXT: mov x9, x0 +; NO-SVE-CHECK-NEXT: stp d11, d10, [sp, #32] // 16-byte Folded Spill +; NO-SVE-CHECK-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill +; NO-SVE-CHECK-NEXT: stp x29, x30, [sp, #64] // 16-byte Folded Spill +; NO-SVE-CHECK-NEXT: bl __arm_get_current_vg +; NO-SVE-CHECK-NEXT: str x0, [sp, #80] // 8-byte Folded Spill +; NO-SVE-CHECK-NEXT: mov x0, x9 +; NO-SVE-CHECK-NEXT: rdsvl x8, #1 +; NO-SVE-CHECK-NEXT: add x29, sp, #64 +; NO-SVE-CHECK-NEXT: lsr x8, x8, #3 +; NO-SVE-CHECK-NEXT: mov x1, x0 +; NO-SVE-CHECK-NEXT: smstart sm +; NO-SVE-CHECK-NEXT: mov x0, x8 +; NO-SVE-CHECK-NEXT: bl bar +; NO-SVE-CHECK-NEXT: smstop sm +; NO-SVE-CHECK-NEXT: ldp x29, x30, [sp, #64] // 16-byte Folded Reload +; NO-SVE-CHECK-NEXT: ldp d9, d8, [sp, #48] // 16-byte Folded Reload +; NO-SVE-CHECK-NEXT: ldp d11, d10, [sp, #32] // 16-byte Folded Reload +; NO-SVE-CHECK-NEXT: ldp d13, d12, [sp, #16] // 16-byte Folded Reload +; NO-SVE-CHECK-NEXT: ldp d15, d14, [sp], #96 // 16-byte Folded Reload +; NO-SVE-CHECK-NEXT: ret + %some_alloc = alloca i64, align 8 + %rdsvl = tail call i64 @llvm.aarch64.sme.cntsd() + call void @bar(i64 %rdsvl, i64 %x0) "aarch64_pstate_sm_enabled" + ret void +} + +declare void @bar(i64, i64) + ; Ensure we still emit async unwind information with -fno-asynchronous-unwind-tables ; if the function contains a streaming-mode change. diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/ARM/scalarize-assert-zext.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/ARM/scalarize-assert-zext.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/ARM/scalarize-assert-zext.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/ARM/scalarize-assert-zext.ll 2025-01-14 16:29:49.000000000 +0000 @@ -0,0 +1,46 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=armv7-unknown-linux-musleabihf -mattr=-neon %s -o - | FileCheck %s + +declare fastcc noundef range(i16 0, 256) <4 x i16> @other() + +define void @test(ptr %0) #0 { +; CHECK-LABEL: test: +; CHECK: @ %bb.0: @ %entry +; CHECK-NEXT: .save {r4, lr} +; CHECK-NEXT: push {r4, lr} +; CHECK-NEXT: mov r4, r0 +; CHECK-NEXT: bl other +; CHECK-NEXT: uxth r3, r3 +; CHECK-NEXT: uxth r2, r2 +; CHECK-NEXT: uxth r1, r1 +; CHECK-NEXT: uxth r0, r0 +; CHECK-NEXT: strb r3, [r4, #3] +; CHECK-NEXT: strb r2, [r4, #2] +; CHECK-NEXT: strb r1, [r4, #1] +; CHECK-NEXT: strb r0, [r4] +; CHECK-NEXT: pop {r4, pc} +entry: + %call = call fastcc <4 x i16> @other() + %t = trunc <4 x i16> %call to <4 x i8> + store <4 x i8> %t, ptr %0, align 1 + ret void +} + +define <4 x i16> @test2() #0 { +; CHECK-LABEL: test2: +; CHECK: @ %bb.0: @ %entry +; CHECK-NEXT: .save {r11, lr} +; CHECK-NEXT: push {r11, lr} +; CHECK-NEXT: bl other +; CHECK-NEXT: movw r1, #65408 +; CHECK-NEXT: and r0, r0, r1 +; CHECK-NEXT: and r2, r2, r1 +; CHECK-NEXT: mov r1, #0 +; CHECK-NEXT: mov r3, #0 +; CHECK-NEXT: pop {r11, pc} +entry: + %call = call fastcc <4 x i16> @other() + %a = and <4 x i16> %call, + ret <4 x i16> %a +} + diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/Hexagon/simple-types-mem.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/Hexagon/simple-types-mem.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/Hexagon/simple-types-mem.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/Hexagon/simple-types-mem.ll 2025-01-07 20:40:33.000000000 +0000 @@ -0,0 +1,22 @@ +; RUN: llc -march=hexagon < %s +; REQUIRES: asserts + +; Only simple types memory accesses are handled. + +target triple = "hexagon" + +%struct.hoge = type { i320 } + +define dso_local void @widget() { +bb: + %tmp = alloca %struct.hoge, align 1 + %tmp1 = bitcast %struct.hoge* %tmp to i320* + %tmp2 = load i320, i320* %tmp1, align 1 + %tmp3 = and i320 %tmp2, -18446744073709551616 + %tmp4 = or i320 %tmp3, 0 + store i320 %tmp4, i320* %tmp1, align 1 + call void @llvm.trap() + unreachable +} + +declare void @llvm.trap() diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/code-models.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/code-models.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/code-models.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/code-models.ll 2025-01-14 16:29:58.000000000 +0000 @@ -82,11 +82,11 @@ ; LARGE-NEXT: .cfi_offset 1, -8 ; LARGE-NEXT: ori $a2, $zero, 1000 ; LARGE-NEXT: move $a1, $zero -; LARGE-NEXT: pcalau12i $ra, %pc_hi20(memset) -; LARGE-NEXT: addi.d $t8, $zero, %pc_lo12(memset) -; LARGE-NEXT: lu32i.d $t8, %pc64_lo20(memset) -; LARGE-NEXT: lu52i.d $t8, $t8, %pc64_hi12(memset) -; LARGE-NEXT: add.d $ra, $t8, $ra +; LARGE-NEXT: pcalau12i $ra, %got_pc_hi20(memset) +; LARGE-NEXT: addi.d $t8, $zero, %got_pc_lo12(memset) +; LARGE-NEXT: lu32i.d $t8, %got64_pc_lo20(memset) +; LARGE-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(memset) +; LARGE-NEXT: ldx.d $ra, $t8, $ra ; LARGE-NEXT: jirl $ra, $ra, 0 ; LARGE-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload ; LARGE-NEXT: addi.d $sp, $sp, 16 diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/e_flags.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/e_flags.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/e_flags.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/e_flags.ll 2025-01-14 16:29:58.000000000 +0000 @@ -1,3 +1,6 @@ +; RUN: llc --mtriple=loongarch32 --filetype=obj %s -o %t-la32s +; RUN: llvm-readelf -h %t-la32s | FileCheck %s --check-prefixes=ILP32,ABI-S --match-full-lines + ; RUN: llc --mtriple=loongarch32 -mattr=+d --filetype=obj %s -o %t-la32 ; RUN: llvm-readelf -h %t-la32 | FileCheck %s --check-prefixes=ILP32,ABI-D --match-full-lines @@ -10,6 +13,9 @@ ; RUN: llc --mtriple=loongarch32 -mattr=+d --filetype=obj %s --target-abi=ilp32d -o %t-ilp32d ; RUN: llvm-readelf -h %t-ilp32d | FileCheck %s --check-prefixes=ILP32,ABI-D --match-full-lines +; RUN: llc --mtriple=loongarch64 -mattr=+d --filetype=obj %s -o %t-la64d +; RUN: llvm-readelf -h %t-la64d | FileCheck %s --check-prefixes=LP64,ABI-D --match-full-lines + ; RUN: llc --mtriple=loongarch64 -mattr=+d --filetype=obj %s -o %t-la64 ; RUN: llvm-readelf -h %t-la64 | FileCheck %s --check-prefixes=LP64,ABI-D --match-full-lines diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/lsx/pr116008.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/lsx/pr116008.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/lsx/pr116008.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/lsx/pr116008.ll 2024-12-03 22:44:50.000000000 +0000 @@ -0,0 +1,17 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s + +define <4 x i32> @xor_shl_splat_vec_one(i32 %x, <4 x i32> %y) nounwind { +; CHECK-LABEL: xor_shl_splat_vec_one: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: vreplgr2vr.w $vr1, $a0 +; CHECK-NEXT: vsll.w $vr0, $vr1, $vr0 +; CHECK-NEXT: vbitrevi.w $vr0, $vr0, 0 +; CHECK-NEXT: ret +entry: + %ins = insertelement <4 x i32> poison, i32 %x, i64 0 + %splat = shufflevector <4 x i32> %ins, <4 x i32> poison, <4 x i32> zeroinitializer + %shl = shl <4 x i32> %splat, %y + %xor = xor <4 x i32> %shl, splat (i32 1) + ret <4 x i32> %xor +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll 2025-01-14 16:29:58.000000000 +0000 @@ -282,11 +282,11 @@ ; LA64LARGE-NEXT: .LBB3_1: # %loop ; LA64LARGE-NEXT: # =>This Inner Loop Header: Depth=1 ; LA64LARGE-NEXT: move $a0, $s0 -; LA64LARGE-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LA64LARGE-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LA64LARGE-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LA64LARGE-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LA64LARGE-NEXT: add.d $ra, $t8, $ra +; LA64LARGE-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LA64LARGE-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LA64LARGE-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LA64LARGE-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LA64LARGE-NEXT: ldx.d $ra, $t8, $ra ; LA64LARGE-NEXT: jirl $ra, $ra, 0 ; LA64LARGE-NEXT: ld.w $zero, $a0, 0 ; LA64LARGE-NEXT: addi.w $s1, $s1, 1 @@ -448,11 +448,11 @@ ; LA64LARGE-NEXT: .LBB5_1: # %loop ; LA64LARGE-NEXT: # =>This Inner Loop Header: Depth=1 ; LA64LARGE-NEXT: move $a0, $s0 -; LA64LARGE-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LA64LARGE-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LA64LARGE-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LA64LARGE-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LA64LARGE-NEXT: add.d $ra, $t8, $ra +; LA64LARGE-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LA64LARGE-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LA64LARGE-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LA64LARGE-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LA64LARGE-NEXT: ldx.d $ra, $t8, $ra ; LA64LARGE-NEXT: jirl $ra, $ra, 0 ; LA64LARGE-NEXT: ld.w $zero, $a0, 0 ; LA64LARGE-NEXT: addi.w $s1, $s1, 1 diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll 2025-01-14 16:29:58.000000000 +0000 @@ -105,11 +105,11 @@ ; LARGE_NO_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(gd) ; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(gd) ; LARGE_NO_SCH-NEXT: add.d $a0, $t8, $a0 -; LARGE_NO_SCH-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LARGE_NO_SCH-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LARGE_NO_SCH-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LARGE_NO_SCH-NEXT: add.d $ra, $t8, $ra +; LARGE_NO_SCH-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LARGE_NO_SCH-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LARGE_NO_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LARGE_NO_SCH-NEXT: ldx.d $ra, $t8, $ra ; LARGE_NO_SCH-NEXT: jirl $ra, $ra, 0 ; LARGE_NO_SCH-NEXT: ld.d $zero, $a0, 0 ; LARGE_NO_SCH-NEXT: pcalau12i $a0, %ld_pc_hi20(ld) @@ -117,11 +117,11 @@ ; LARGE_NO_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(ld) ; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(ld) ; LARGE_NO_SCH-NEXT: add.d $a0, $t8, $a0 -; LARGE_NO_SCH-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LARGE_NO_SCH-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LARGE_NO_SCH-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LARGE_NO_SCH-NEXT: add.d $ra, $t8, $ra +; LARGE_NO_SCH-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LARGE_NO_SCH-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LARGE_NO_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LARGE_NO_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LARGE_NO_SCH-NEXT: ldx.d $ra, $t8, $ra ; LARGE_NO_SCH-NEXT: jirl $ra, $ra, 0 ; LARGE_NO_SCH-NEXT: pcalau12i $a1, %ie_pc_hi20(ie) ; LARGE_NO_SCH-NEXT: addi.d $t8, $zero, %ie_pc_lo12(ie) @@ -162,11 +162,11 @@ ; LARGE_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(gd) ; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(gd) ; LARGE_SCH-NEXT: add.d $a0, $t8, $a0 -; LARGE_SCH-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LARGE_SCH-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LARGE_SCH-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LARGE_SCH-NEXT: add.d $ra, $t8, $ra +; LARGE_SCH-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LARGE_SCH-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LARGE_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LARGE_SCH-NEXT: ldx.d $ra, $t8, $ra ; LARGE_SCH-NEXT: jirl $ra, $ra, 0 ; LARGE_SCH-NEXT: ld.d $zero, $a0, 0 ; LARGE_SCH-NEXT: pcalau12i $a0, %ld_pc_hi20(ld) @@ -174,11 +174,11 @@ ; LARGE_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(ld) ; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(ld) ; LARGE_SCH-NEXT: add.d $a0, $t8, $a0 -; LARGE_SCH-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LARGE_SCH-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LARGE_SCH-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LARGE_SCH-NEXT: add.d $ra, $t8, $ra +; LARGE_SCH-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LARGE_SCH-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LARGE_SCH-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LARGE_SCH-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LARGE_SCH-NEXT: ldx.d $ra, $t8, $ra ; LARGE_SCH-NEXT: jirl $ra, $ra, 0 ; LARGE_SCH-NEXT: pcalau12i $a1, %ie_pc_hi20(ie) ; LARGE_SCH-NEXT: addi.d $t8, $zero, %ie_pc_lo12(ie) diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/tls-models.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/tls-models.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/LoongArch/tls-models.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/LoongArch/tls-models.ll 2025-01-14 16:29:58.000000000 +0000 @@ -55,11 +55,11 @@ ; LA64LARGEPIC-NEXT: lu32i.d $t8, %got64_pc_lo20(unspecified) ; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(unspecified) ; LA64LARGEPIC-NEXT: add.d $a0, $t8, $a0 -; LA64LARGEPIC-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LA64LARGEPIC-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LA64LARGEPIC-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LA64LARGEPIC-NEXT: add.d $ra, $t8, $ra +; LA64LARGEPIC-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LA64LARGEPIC-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LA64LARGEPIC-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LA64LARGEPIC-NEXT: ldx.d $ra, $t8, $ra ; LA64LARGEPIC-NEXT: jirl $ra, $ra, 0 ; LA64LARGEPIC-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload ; LA64LARGEPIC-NEXT: addi.d $sp, $sp, 16 @@ -169,11 +169,11 @@ ; LA64LARGEPIC-NEXT: lu32i.d $t8, %got64_pc_lo20(ld) ; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(ld) ; LA64LARGEPIC-NEXT: add.d $a0, $t8, $a0 -; LA64LARGEPIC-NEXT: pcalau12i $ra, %pc_hi20(__tls_get_addr) -; LA64LARGEPIC-NEXT: addi.d $t8, $zero, %pc_lo12(__tls_get_addr) -; LA64LARGEPIC-NEXT: lu32i.d $t8, %pc64_lo20(__tls_get_addr) -; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %pc64_hi12(__tls_get_addr) -; LA64LARGEPIC-NEXT: add.d $ra, $t8, $ra +; LA64LARGEPIC-NEXT: pcalau12i $ra, %got_pc_hi20(__tls_get_addr) +; LA64LARGEPIC-NEXT: addi.d $t8, $zero, %got_pc_lo12(__tls_get_addr) +; LA64LARGEPIC-NEXT: lu32i.d $t8, %got64_pc_lo20(__tls_get_addr) +; LA64LARGEPIC-NEXT: lu52i.d $t8, $t8, %got64_pc_hi12(__tls_get_addr) +; LA64LARGEPIC-NEXT: ldx.d $ra, $t8, $ra ; LA64LARGEPIC-NEXT: jirl $ra, $ra, 0 ; LA64LARGEPIC-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload ; LA64LARGEPIC-NEXT: addi.d $sp, $sp, 16 diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/Mips/lcb5.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/Mips/lcb5.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/Mips/lcb5.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/Mips/lcb5.ll 2025-01-14 16:29:58.000000000 +0000 @@ -186,7 +186,7 @@ } ; ci: .ent z3 -; ci: bteqz $BB6_3 +; ci: bteqz $BB6_2 ; ci: .end z3 ; Function Attrs: nounwind optsize @@ -210,7 +210,7 @@ ; ci: .ent z4 ; ci: btnez $BB7_1 # 16 bit inst -; ci: jal $BB7_3 # branch +; ci: jal $BB7_2 # branch ; ci: nop ; ci: $BB7_1: ; ci: .p2align 2 diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/rv32-zve-bitcast-crash.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/rv32-zve-bitcast-crash.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/rv32-zve-bitcast-crash.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/rv32-zve-bitcast-crash.ll 2025-01-14 16:29:58.000000000 +0000 @@ -0,0 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=riscv32 -mattr=+zve32f,+zvl128b | FileCheck %s + +; This bitcast previously incorrectly produce a SplitF64 node. + +define i64 @foo(double %x) { +; CHECK-LABEL: foo: +; CHECK: # %bb.0: +; CHECK-NEXT: addi sp, sp, -16 +; CHECK-NEXT: .cfi_def_cfa_offset 16 +; CHECK-NEXT: sw ra, 12(sp) # 4-byte Folded Spill +; CHECK-NEXT: .cfi_offset ra, -4 +; CHECK-NEXT: lui a3, 261888 +; CHECK-NEXT: li a2, 0 +; CHECK-NEXT: call __adddf3 +; CHECK-NEXT: lw ra, 12(sp) # 4-byte Folded Reload +; CHECK-NEXT: addi sp, sp, 16 +; CHECK-NEXT: ret + %a = fadd double %x, 1.0 + %b = bitcast double %a to i64 + ret i64 %b +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_x_f_qf.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_x_f_qf.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_x_f_qf.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_x_f_qf.ll 2024-12-18 10:49:13.000000000 +0000 @@ -13,10 +13,8 @@ define @intrinsic_sf_vfnrclip_x_f_qf_nxv1i8_nxv1f32( %0, float %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_sf_vfnrclip_x_f_qf_nxv1i8_nxv1f32: ; CHECK: # %bb.0: # %entry -; CHECK-NEXT: fsrmi a1, 0 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma ; CHECK-NEXT: sf.vfnrclip.x.f.qf v9, v8, fa0 -; CHECK-NEXT: fsrm a1 ; CHECK-NEXT: vmv1r.v v8, v9 ; CHECK-NEXT: ret entry: @@ -24,7 +22,7 @@ undef, %0, float %1, - iXLen 0, iXLen %2) + iXLen 7, iXLen %2) ret %a } diff -Nru llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_xu_f_qf.ll llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_xu_f_qf.ll --- llvm-toolchain-19-19.1.4/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_xu_f_qf.ll 2024-11-26 09:13:21.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/CodeGen/RISCV/rvv/sf_vfnrclip_xu_f_qf.ll 2024-12-18 10:49:13.000000000 +0000 @@ -13,10 +13,8 @@ define @intrinsic_sf_vfnrclip_xu_f_qf_nxv1i8_nxv1f32( %0, float %1, iXLen %2) nounwind { ; CHECK-LABEL: intrinsic_sf_vfnrclip_xu_f_qf_nxv1i8_nxv1f32: ; CHECK: # %bb.0: # %entry -; CHECK-NEXT: fsrmi a1, 0 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma ; CHECK-NEXT: sf.vfnrclip.xu.f.qf v9, v8, fa0 -; CHECK-NEXT: fsrm a1 ; CHECK-NEXT: vmv1r.v v8, v9 ; CHECK-NEXT: ret entry: @@ -24,7 +22,7 @@ undef, %0, float %1, - iXLen 0, iXLen %2) + iXLen 7, iXLen %2) ret %a } diff -Nru llvm-toolchain-19-19.1.4/llvm/test/MC/WebAssembly/init-array-label.s llvm-toolchain-19-19.1.7/llvm/test/MC/WebAssembly/init-array-label.s --- llvm-toolchain-19-19.1.4/llvm/test/MC/WebAssembly/init-array-label.s 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/MC/WebAssembly/init-array-label.s 2024-12-10 19:22:27.000000000 +0000 @@ -0,0 +1,91 @@ +# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj < %s | obj2yaml | FileCheck %s + +init1: + .functype init1 () -> () + end_function + +init2: + .functype init2 () -> () + end_function + + .section .init_array.42,"",@ + .p2align 2, 0x0 + .int32 init1 + + .section .init_array,"",@ + .globl p_init1 + .p2align 2, 0x0 +p_init1: + .int32 init1 + .size p_init1, 4 + + .section .init_array,"",@ + .globl p_init2 + .p2align 2, 0x0 +p_init2: + .int32 init1 + .int32 init2 + .size p_init2, 8 + +# CHECK: - Type: FUNCTION +# CHECK-NEXT: FunctionTypes: [ 0, 0 ] +# CHECK-NEXT: - Type: DATACOUNT +# CHECK-NEXT: Count: 1 +# CHECK-NEXT: - Type: CODE +# CHECK-NEXT: Functions: +# CHECK-NEXT: - Index: 0 +# CHECK-NEXT: Locals: [] +# CHECK-NEXT: Body: 0B +# CHECK-NEXT: - Index: 1 +# CHECK-NEXT: Locals: [] +# CHECK-NEXT: Body: 0B +# CHECK-NEXT: - Type: DATA +# CHECK-NEXT: Segments: +# CHECK-NEXT: - SectionOffset: 6 +# CHECK-NEXT: InitFlags: 0 +# CHECK-NEXT: Offset: +# CHECK-NEXT: Opcode: I32_CONST +# CHECK-NEXT: Value: 0 +# CHECK-NEXT: Content: '000000000000000000000000' +# CHECK-NEXT: - Type: CUSTOM +# CHECK-NEXT: Name: linking +# CHECK-NEXT: Version: 2 +# CHECK-NEXT: SymbolTable: +# CHECK-NEXT: - Index: 0 +# CHECK-NEXT: Kind: FUNCTION +# CHECK-NEXT: Name: init1 +# CHECK-NEXT: Flags: [ BINDING_LOCAL ] +# CHECK-NEXT: Function: 0 +# CHECK-NEXT: - Index: 1 +# CHECK-NEXT: Kind: FUNCTION +# CHECK-NEXT: Name: init2 +# CHECK-NEXT: Flags: [ BINDING_LOCAL ] +# CHECK-NEXT: Function: 1 +# CHECK-NEXT: - Index: 2 +# CHECK-NEXT: Kind: DATA +# CHECK-NEXT: Name: p_init1 +# CHECK-NEXT: Flags: [ ] +# CHECK-NEXT: Segment: 0 +# CHECK-NEXT: Size: 4 +# CHECK-NEXT: - Index: 3 +# CHECK-NEXT: Kind: DATA +# CHECK-NEXT: Name: p_init2 +# CHECK-NEXT: Flags: [ ] +# CHECK-NEXT: Segment: 0 +# CHECK-NEXT: Offset: 4 +# CHECK-NEXT: Size: 8 +# CHECK-NEXT: SegmentInfo: +# CHECK-NEXT: - Index: 0 +# CHECK-NEXT: Name: .init_array +# CHECK-NEXT: Alignment: 2 +# CHECK-NEXT: Flags: [ ] +# CHECK-NEXT: InitFunctions: +# CHECK-NEXT: - Priority: 42 +# CHECK-NEXT: Symbol: 0 +# CHECK-NEXT: - Priority: 65535 +# CHECK-NEXT: Symbol: 0 +# CHECK-NEXT: - Priority: 65535 +# CHECK-NEXT: Symbol: 0 +# CHECK-NEXT: - Priority: 65535 +# CHECK-NEXT: Symbol: 1 +# CHECK-NEXT: ... diff -Nru llvm-toolchain-19-19.1.4/llvm/test/MC/WebAssembly/init-array.s llvm-toolchain-19-19.1.7/llvm/test/MC/WebAssembly/init-array.s --- llvm-toolchain-19-19.1.4/llvm/test/MC/WebAssembly/init-array.s 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/MC/WebAssembly/init-array.s 2024-12-04 22:18:07.000000000 +0000 @@ -0,0 +1,49 @@ +# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj < %s | obj2yaml | FileCheck %s + +init1: + .functype init1 () -> () + end_function + +init2: + .functype init2 () -> () + end_function + + .section .init_array,"",@ + .p2align 2, 0 + .int32 init1 + + .section .init_array,"",@ + .p2align 2 + .int32 init2 + +# CHECK: - Type: FUNCTION +# CHECK-NEXT: FunctionTypes: [ 0, 0 ] +# CHECK-NEXT: - Type: CODE +# CHECK-NEXT: Functions: +# CHECK-NEXT: - Index: 0 +# CHECK-NEXT: Locals: [] +# CHECK-NEXT: Body: 0B +# CHECK-NEXT: - Index: 1 +# CHECK-NEXT: Locals: [] +# CHECK-NEXT: Body: 0B +# CHECK-NEXT: - Type: CUSTOM +# CHECK-NEXT: Name: linking +# CHECK-NEXT: Version: 2 +# CHECK-NEXT: SymbolTable: +# CHECK-NEXT: - Index: 0 +# CHECK-NEXT: Kind: FUNCTION +# CHECK-NEXT: Name: init1 +# CHECK-NEXT: Flags: [ BINDING_LOCAL ] +# CHECK-NEXT: Function: 0 +# CHECK-NEXT: - Index: 1 +# CHECK-NEXT: Kind: FUNCTION +# CHECK-NEXT: Name: init2 +# CHECK-NEXT: Flags: [ BINDING_LOCAL ] +# CHECK-NEXT: Function: 1 +# CHECK-NEXT: InitFunctions: +# CHECK-NEXT: - Priority: 65535 +# CHECK-NEXT: Symbol: 0 +# CHECK-NEXT: - Priority: 65535 +# CHECK-NEXT: Symbol: 1 +# CHECK-NEXT: ... +# diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll 2024-11-26 09:13:16.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll 2024-12-04 22:18:02.000000000 +0000 @@ -1121,19 +1121,19 @@ define i32 @loadCombine_4consecutive_metadata(ptr %p, ptr %pstr) { ; LE-LABEL: @loadCombine_4consecutive_metadata( -; LE-NEXT: [[L1:%.*]] = load i32, ptr [[P:%.*]], align 1, !alias.scope !0 -; LE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias !0 +; LE-NEXT: [[L1:%.*]] = load i32, ptr [[P:%.*]], align 1, !alias.scope [[META0:![0-9]+]] +; LE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias [[META0]] ; LE-NEXT: ret i32 [[L1]] ; ; BE-LABEL: @loadCombine_4consecutive_metadata( ; BE-NEXT: [[P1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 1 ; BE-NEXT: [[P2:%.*]] = getelementptr i8, ptr [[P]], i32 2 ; BE-NEXT: [[P3:%.*]] = getelementptr i8, ptr [[P]], i32 3 -; BE-NEXT: [[L1:%.*]] = load i8, ptr [[P]], align 1, !alias.scope !0 -; BE-NEXT: [[L2:%.*]] = load i8, ptr [[P1]], align 1, !alias.scope !0 -; BE-NEXT: [[L3:%.*]] = load i8, ptr [[P2]], align 1, !alias.scope !0 -; BE-NEXT: [[L4:%.*]] = load i8, ptr [[P3]], align 1, !alias.scope !0 -; BE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias !0 +; BE-NEXT: [[L1:%.*]] = load i8, ptr [[P]], align 1, !alias.scope [[META0:![0-9]+]] +; BE-NEXT: [[L2:%.*]] = load i8, ptr [[P1]], align 1, !alias.scope [[META0]] +; BE-NEXT: [[L3:%.*]] = load i8, ptr [[P2]], align 1, !alias.scope [[META0]] +; BE-NEXT: [[L4:%.*]] = load i8, ptr [[P3]], align 1, !alias.scope [[META0]] +; BE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias [[META0]] ; BE-NEXT: [[E1:%.*]] = zext i8 [[L1]] to i32 ; BE-NEXT: [[E2:%.*]] = zext i8 [[L2]] to i32 ; BE-NEXT: [[E3:%.*]] = zext i8 [[L3]] to i32 @@ -1869,7 +1869,7 @@ define i32 @loadCombine_4consecutive_badinsert3(ptr %p) { ; LE-LABEL: @loadCombine_4consecutive_badinsert3( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 1 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 1 ; LE-NEXT: [[L1:%.*]] = load i32, ptr [[TMP1]], align 1 ; LE-NEXT: ret i32 [[L1]] ; @@ -2088,7 +2088,7 @@ define void @nested_gep(ptr %p, ptr %dest) { ; LE-LABEL: @nested_gep( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 68 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 68 ; LE-NEXT: [[LD2:%.*]] = load i64, ptr [[TMP1]], align 4 ; LE-NEXT: [[TRUNC:%.*]] = trunc i64 [[LD2]] to i32 ; LE-NEXT: store i32 [[TRUNC]], ptr [[DEST:%.*]], align 4 @@ -2128,7 +2128,7 @@ define void @bitcast_gep(ptr %p, ptr %dest) { ; LE-LABEL: @bitcast_gep( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 68 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 68 ; LE-NEXT: [[LD2:%.*]] = load i64, ptr [[TMP1]], align 4 ; LE-NEXT: [[TRUNC:%.*]] = trunc i64 [[LD2]] to i32 ; LE-NEXT: store i32 [[TRUNC]], ptr [[DEST:%.*]], align 4 diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll 2024-11-26 09:13:16.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll 2024-12-04 22:18:02.000000000 +0000 @@ -1205,19 +1205,19 @@ define i32 @loadCombine_4consecutive_metadata(ptr %p, ptr %pstr) { ; LE-LABEL: @loadCombine_4consecutive_metadata( -; LE-NEXT: [[L1:%.*]] = load i32, ptr [[P:%.*]], align 1, !alias.scope !0 -; LE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias !0 +; LE-NEXT: [[L1:%.*]] = load i32, ptr [[P:%.*]], align 1, !alias.scope [[META0:![0-9]+]] +; LE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias [[META0]] ; LE-NEXT: ret i32 [[L1]] ; ; BE-LABEL: @loadCombine_4consecutive_metadata( ; BE-NEXT: [[P1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 1 ; BE-NEXT: [[P2:%.*]] = getelementptr i8, ptr [[P]], i32 2 ; BE-NEXT: [[P3:%.*]] = getelementptr i8, ptr [[P]], i32 3 -; BE-NEXT: [[L1:%.*]] = load i8, ptr [[P]], align 1, !alias.scope !0 -; BE-NEXT: [[L2:%.*]] = load i8, ptr [[P1]], align 1, !alias.scope !0 -; BE-NEXT: [[L3:%.*]] = load i8, ptr [[P2]], align 1, !alias.scope !0 -; BE-NEXT: [[L4:%.*]] = load i8, ptr [[P3]], align 1, !alias.scope !0 -; BE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias !0 +; BE-NEXT: [[L1:%.*]] = load i8, ptr [[P]], align 1, !alias.scope [[META0:![0-9]+]] +; BE-NEXT: [[L2:%.*]] = load i8, ptr [[P1]], align 1, !alias.scope [[META0]] +; BE-NEXT: [[L3:%.*]] = load i8, ptr [[P2]], align 1, !alias.scope [[META0]] +; BE-NEXT: [[L4:%.*]] = load i8, ptr [[P3]], align 1, !alias.scope [[META0]] +; BE-NEXT: store i32 25, ptr [[PSTR:%.*]], align 4, !noalias [[META0]] ; BE-NEXT: [[E1:%.*]] = zext i8 [[L1]] to i32 ; BE-NEXT: [[E2:%.*]] = zext i8 [[L2]] to i32 ; BE-NEXT: [[E3:%.*]] = zext i8 [[L3]] to i32 @@ -2005,7 +2005,7 @@ define i32 @loadCombine_4consecutive_badinsert3(ptr %p) { ; LE-LABEL: @loadCombine_4consecutive_badinsert3( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 1 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 1 ; LE-NEXT: [[L1:%.*]] = load i32, ptr [[TMP1]], align 1 ; LE-NEXT: ret i32 [[L1]] ; @@ -2306,7 +2306,7 @@ define void @nested_gep(ptr %p, ptr %dest) { ; LE-LABEL: @nested_gep( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 68 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 68 ; LE-NEXT: [[LD2:%.*]] = load i64, ptr [[TMP1]], align 4 ; LE-NEXT: [[TRUNC:%.*]] = trunc i64 [[LD2]] to i32 ; LE-NEXT: store i32 [[TRUNC]], ptr [[DEST:%.*]], align 4 @@ -2346,7 +2346,7 @@ define void @bitcast_gep(ptr %p, ptr %dest) { ; LE-LABEL: @bitcast_gep( -; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i32 68 +; LE-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[P:%.*]], i64 68 ; LE-NEXT: [[LD2:%.*]] = load i64, ptr [[TMP1]], align 4 ; LE-NEXT: [[TRUNC:%.*]] = trunc i64 [[LD2]] to i32 ; LE-NEXT: store i32 [[TRUNC]], ptr [[DEST:%.*]], align 4 @@ -2382,3 +2382,35 @@ store i32 %trunc, ptr %dest, align 4 ret void } + +define i32 @loadcombine_consecutive_idx_64(ptr %data) { +; LE-LABEL: @loadcombine_consecutive_idx_64( +; LE-NEXT: entry: +; LE-NEXT: [[TMP0:%.*]] = getelementptr i8, ptr [[DATA:%.*]], i64 2149675576 +; LE-NEXT: [[VAL_2:%.*]] = load i16, ptr [[TMP0]], align 1 +; LE-NEXT: [[TMP1:%.*]] = zext i16 [[VAL_2]] to i32 +; LE-NEXT: ret i32 [[TMP1]] +; +; BE-LABEL: @loadcombine_consecutive_idx_64( +; BE-NEXT: entry: +; BE-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds nuw i8, ptr [[DATA:%.*]], i64 2149675577 +; BE-NEXT: [[VAL:%.*]] = load i8, ptr [[ARRAYIDX]], align 1 +; BE-NEXT: [[CONV:%.*]] = zext i8 [[VAL]] to i32 +; BE-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds nuw i8, ptr [[DATA]], i64 2149675576 +; BE-NEXT: [[VAL_2:%.*]] = load i8, ptr [[ARRAYIDX_2]], align 1 +; BE-NEXT: [[CONV_2:%.*]] = zext i8 [[VAL_2]] to i32 +; BE-NEXT: [[SHL:%.*]] = shl nuw nsw i32 [[CONV]], 8 +; BE-NEXT: [[OR:%.*]] = or disjoint i32 [[SHL]], [[CONV_2]] +; BE-NEXT: ret i32 [[OR]] +; +entry: + %arrayidx = getelementptr inbounds nuw i8, ptr %data, i64 2149675577 + %val = load i8, ptr %arrayidx, align 1 + %conv = zext i8 %val to i32 + %arrayidx.2 = getelementptr inbounds nuw i8, ptr %data, i64 2149675576 + %val.2 = load i8, ptr %arrayidx.2, align 1 + %conv.2 = zext i8 %val.2 to i32 + %shl = shl nuw nsw i32 %conv, 8 + %or = or disjoint i32 %shl, %conv.2 + ret i32 %or +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit.ll 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit.ll 2024-12-03 22:44:51.000000000 +0000 @@ -763,3 +763,47 @@ %t.2 = icmp ult i32 %iv, %N ret i1 %t.2 } + +define i1 @test_non_dedicated_exit(i16 %n) { +; CHECK-LABEL: define i1 @test_non_dedicated_exit( +; CHECK-SAME: i16 [[N:%.*]]) { +; CHECK-NEXT: [[ENTRY:.*:]] +; CHECK-NEXT: [[COND:%.*]] = icmp slt i16 [[N]], 1 +; CHECK-NEXT: br i1 [[COND]], label %[[EXIT:.*]], label %[[LOOP_PREHEADER:.*]] +; CHECK: [[LOOP_PREHEADER]]: +; CHECK-NEXT: [[SUB:%.*]] = add nsw i16 [[N]], -1 +; CHECK-NEXT: [[EXT:%.*]] = zext nneg i16 [[SUB]] to i32 +; CHECK-NEXT: br label %[[LOOP:.*]] +; CHECK: [[LOOP]]: +; CHECK-NEXT: [[INDVAR:%.*]] = phi i32 [ [[INDVAR_INC:%.*]], %[[LOOP_LATCH:.*]] ], [ 0, %[[LOOP_PREHEADER]] ] +; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INDVAR]], [[EXT]] +; CHECK-NEXT: br i1 [[EXITCOND]], label %[[EXIT]], label %[[LOOP_LATCH]] +; CHECK: [[LOOP_LATCH]]: +; CHECK-NEXT: [[INDVAR_INC]] = add nuw nsw i32 [[INDVAR]], 1 +; CHECK-NEXT: br label %[[LOOP]] +; CHECK: [[EXIT]]: +; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i16 [[N]], 0 +; CHECK-NEXT: ret i1 [[CMP]] +; +entry: + %cond = icmp slt i16 %n, 1 + br i1 %cond, label %exit, label %loop.preheader + +loop.preheader: + %sub = add nsw i16 %n, -1 + %ext = zext nneg i16 %sub to i32 + br label %loop + +loop: + %indvar = phi i32 [ %indvar.inc, %loop.latch ], [ 0, %loop.preheader ] + %exitcond = icmp eq i32 %indvar, %ext + br i1 %exitcond, label %exit, label %loop.latch + +loop.latch: + %indvar.inc = add nuw nsw i32 %indvar, 1 + br label %loop + +exit: + %cmp = icmp sgt i16 %n, 0 + ret i1 %cmp +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/IndVarSimplify/pr116483.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/IndVarSimplify/pr116483.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/IndVarSimplify/pr116483.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/IndVarSimplify/pr116483.ll 2024-12-03 22:44:51.000000000 +0000 @@ -0,0 +1,36 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=indvars < %s | FileCheck %s + +define i32 @test() { +; CHECK-LABEL: define i32 @test() { +; CHECK-NEXT: [[ENTRY:.*:]] +; CHECK-NEXT: [[XOR:%.*]] = xor i32 0, 3 +; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[XOR]], 329 +; CHECK-NEXT: [[CONV:%.*]] = trunc i32 [[MUL]] to i16 +; CHECK-NEXT: [[SEXT:%.*]] = shl i16 [[CONV]], 8 +; CHECK-NEXT: [[CONV1:%.*]] = ashr i16 [[SEXT]], 8 +; CHECK-NEXT: br label %[[LOOP_BODY:.*]] +; CHECK: [[LOOP_BODY]]: +; CHECK-NEXT: br i1 true, label %[[EXIT:.*]], label %[[LOOP_BODY]] +; CHECK: [[EXIT]]: +; CHECK-NEXT: [[CONV3:%.*]] = zext i16 [[CONV1]] to i32 +; CHECK-NEXT: ret i32 [[CONV3]] +; +entry: + %xor = xor i32 0, 3 + %mul = mul i32 %xor, 329 + %conv = trunc i32 %mul to i16 + %sext = shl i16 %conv, 8 + %conv1 = ashr i16 %sext, 8 + %conv3 = zext i16 %conv1 to i32 + br label %loop.body + +loop.body: + %indvar = phi i32 [ %indvar.inc, %loop.body ], [ 1, %entry ] + %indvar.inc = add nuw i32 %indvar, 1 + %exitcond = icmp eq i32 %indvar, %conv3 + br i1 %exitcond, label %exit, label %loop.body + +exit: + ret i32 %conv3 +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/InstCombine/ptrmask.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/InstCombine/ptrmask.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/InstCombine/ptrmask.ll 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/InstCombine/ptrmask.ll 2025-01-14 16:29:59.000000000 +0000 @@ -578,3 +578,16 @@ %r = call ptr @llvm.ptrmask.p0.i64(ptr %p0, i64 %m0) ret ptr %r } + +@GC_arrays = external global { i8, i8, i64 } + +define ptr @ptrmask_demandedbits_constantexpr() { +; CHECK-LABEL: define ptr @ptrmask_demandedbits_constantexpr() { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[ALIGNED_RESULT:%.*]] = call align 8 ptr @llvm.ptrmask.p0.i64(ptr nonnull @GC_arrays, i64 -8) +; CHECK-NEXT: ret ptr [[ALIGNED_RESULT]] +; +entry: + %aligned_result = call ptr @llvm.ptrmask.p0.i64(ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 1), i64 -8) + ret ptr %aligned_result +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll 2024-12-03 22:44:51.000000000 +0000 @@ -15,6 +15,22 @@ ret i32 %res } +; Make sure that noundef is dropped. + +define i32 @shl_cttz_false_noundef(i32 %x, i32 %y) { +; CHECK-LABEL: define i32 @shl_cttz_false_noundef( +; CHECK-SAME: i32 [[X:%.*]], i32 [[Y:%.*]]) { +; CHECK-NEXT: entry: +; CHECK-NEXT: [[CTTZ:%.*]] = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 [[Y]], i1 true) +; CHECK-NEXT: [[RES:%.*]] = shl i32 [[X]], [[CTTZ]] +; CHECK-NEXT: ret i32 [[RES]] +; +entry: + %cttz = call noundef i32 @llvm.cttz.i32(i32 %y, i1 false) + %res = shl i32 %x, %cttz + ret i32 %res +} + define i32 @shl_ctlz_false(i32 %x, i32 %y) { ; CHECK-LABEL: define i32 @shl_ctlz_false( ; CHECK-SAME: i32 [[X:%.*]], i32 [[Y:%.*]]) { diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/LICM/PR116813-memoryssa-outdated.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/LICM/PR116813-memoryssa-outdated.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/LICM/PR116813-memoryssa-outdated.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/LICM/PR116813-memoryssa-outdated.ll 2024-12-03 22:44:51.000000000 +0000 @@ -0,0 +1,50 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -passes='loop-mssa(simple-loop-unswitch,licm)' -verify-memoryssa -S < %s | FileCheck %s + +; Check that running LICM after SimpleLoopUnswitch does not result in a crash. + +define i32 @foo(i1 %arg, ptr %arg1) { +; CHECK-LABEL: define i32 @foo( +; CHECK-SAME: i1 [[ARG:%.*]], ptr [[ARG1:%.*]]) { +; CHECK-NEXT: [[START:.*:]] +; CHECK-NEXT: [[ARG_FR:%.*]] = freeze i1 [[ARG]] +; CHECK-NEXT: br i1 [[ARG_FR]], label %[[START_SPLIT_US:.*]], label %[[START_SPLIT:.*]] +; CHECK: [[START_SPLIT_US]]: +; CHECK-NEXT: br label %[[LOOP_US:.*]] +; CHECK: [[LOOP_US]]: +; CHECK-NEXT: br label %[[BB0:.*]] +; CHECK: [[BB0]]: +; CHECK-NEXT: br label %[[BB1:.*]] +; CHECK: [[BB1]]: +; CHECK-NEXT: [[UNSWITCHED_SELECT_US:%.*]] = phi ptr [ [[ARG1]], %[[BB0]] ] +; CHECK-NEXT: [[I3_US:%.*]] = call i32 [[UNSWITCHED_SELECT_US]]() +; CHECK-NEXT: br i1 true, label %[[LOOP_US]], label %[[RET_SPLIT_US:.*]] +; CHECK: [[RET_SPLIT_US]]: +; CHECK-NEXT: [[I3_LCSSA_US:%.*]] = phi i32 [ [[I3_US]], %[[BB1]] ] +; CHECK-NEXT: br label %[[RET:.*]] +; CHECK: [[START_SPLIT]]: +; CHECK-NEXT: br label %[[LOOP:.*]] +; CHECK: [[LOOP]]: +; CHECK-NEXT: br label %[[BB2:.*]] +; CHECK: [[BB2]]: +; CHECK-NEXT: br i1 false, label %[[LOOP]], label %[[RET_SPLIT:.*]] +; CHECK: [[RET_SPLIT]]: +; CHECK-NEXT: [[I3_LE:%.*]] = call i32 @bar() +; CHECK-NEXT: br label %[[RET]] +; CHECK: [[RET]]: +; CHECK-NEXT: [[DOTUS_PHI:%.*]] = phi i32 [ [[I3_LE]], %[[RET_SPLIT]] ], [ [[I3_LCSSA_US]], %[[RET_SPLIT_US]] ] +; CHECK-NEXT: ret i32 [[DOTUS_PHI]] +; +start: + br label %loop + +loop: ; preds = %loop, %bb + %i = select i1 %arg, ptr %arg1, ptr @bar + %i3 = call i32 %i() + br i1 %arg, label %loop, label %ret + +ret: ; preds = %loop + ret i32 %i3 +} + +declare i32 @bar() nounwind willreturn memory(none) diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/SLPVectorizer/abs-overflow-incorrect-minbws.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/SLPVectorizer/abs-overflow-incorrect-minbws.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/SLPVectorizer/abs-overflow-incorrect-minbws.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/SLPVectorizer/abs-overflow-incorrect-minbws.ll 2025-01-14 16:29:59.000000000 +0000 @@ -0,0 +1,33 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S --passes=slp-vectorizer < %s | FileCheck %s + +define i32 @test(i32 %n) { +; CHECK-LABEL: define i32 @test( +; CHECK-SAME: i32 [[N:%.*]]) { +; CHECK-NEXT: [[ENTRY:.*:]] +; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i32> poison, i32 [[N]], i32 0 +; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x i32> [[TMP0]], <2 x i32> poison, <2 x i32> zeroinitializer +; CHECK-NEXT: [[TMP2:%.*]] = add <2 x i32> [[TMP1]], +; CHECK-NEXT: [[TMP3:%.*]] = zext <2 x i32> [[TMP2]] to <2 x i64> +; CHECK-NEXT: [[TMP7:%.*]] = mul nuw nsw <2 x i64> [[TMP3]], +; CHECK-NEXT: [[TMP8:%.*]] = call <2 x i64> @llvm.abs.v2i64(<2 x i64> [[TMP7]], i1 true) +; CHECK-NEXT: [[TMP4:%.*]] = trunc <2 x i64> [[TMP8]] to <2 x i32> +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP4]], i32 0 +; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i32> [[TMP4]], i32 1 +; CHECK-NEXT: [[RES1:%.*]] = add i32 [[TMP5]], [[TMP6]] +; CHECK-NEXT: ret i32 [[RES1]] +; +entry: + %n1 = add i32 %n, 1 + %zn1 = zext nneg i32 %n1 to i64 + %m1 = mul nuw nsw i64 %zn1, 273837369 + %a1 = call i64 @llvm.abs.i64(i64 %m1, i1 true) + %t1 = trunc i64 %a1 to i32 + %n2 = add i32 %n, 2 + %zn2 = zext nneg i32 %n2 to i64 + %m2 = mul nuw nsw i64 %zn2, 273837369 + %a2 = call i64 @llvm.abs.i64(i64 %m2, i1 true) + %t2 = trunc i64 %a2 to i32 + %res1 = add i32 %t1, %t2 + ret i32 %res1 +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/SLPVectorizer/slp-deleted-inst.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/SLPVectorizer/slp-deleted-inst.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/SLPVectorizer/slp-deleted-inst.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/SLPVectorizer/slp-deleted-inst.ll 2024-12-19 18:14:25.000000000 +0000 @@ -0,0 +1,51 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=slp-vectorizer < %s | FileCheck %s + +define void @foo() { +; CHECK-LABEL: define void @foo() { +; CHECK-NEXT: [[BB:.*]]: +; CHECK-NEXT: br label %[[BB1:.*]] +; CHECK: [[BB1]]: +; CHECK-NEXT: [[TMP0:%.*]] = phi <2 x i32> [ [[TMP11:%.*]], %[[BB3:.*]] ], [ zeroinitializer, %[[BB]] ] +; CHECK-NEXT: br label %[[BB3]] +; CHECK: [[BB3]]: +; CHECK-NEXT: [[TMP1:%.*]] = trunc <2 x i32> [[TMP0]] to <2 x i1> +; CHECK-NEXT: [[TMP2:%.*]] = mul <2 x i1> [[TMP1]], zeroinitializer +; CHECK-NEXT: [[TMP3:%.*]] = or <2 x i1> zeroinitializer, [[TMP2]] +; CHECK-NEXT: [[TMP4:%.*]] = and <2 x i1> [[TMP3]], zeroinitializer +; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0 +; CHECK-NEXT: [[TMP6:%.*]] = zext i1 [[TMP5]] to i32 +; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1 +; CHECK-NEXT: [[TMP8:%.*]] = zext i1 [[TMP7]] to i32 +; CHECK-NEXT: [[I22:%.*]] = or i32 [[TMP6]], [[TMP8]] +; CHECK-NEXT: [[TMP9:%.*]] = insertelement <2 x i32> , i32 [[I22]], i32 0 +; CHECK-NEXT: [[TMP10:%.*]] = icmp ult <2 x i32> [[TMP9]], zeroinitializer +; CHECK-NEXT: [[TMP11]] = select <2 x i1> [[TMP10]], <2 x i32> zeroinitializer, <2 x i32> zeroinitializer +; CHECK-NEXT: br label %[[BB1]] +; +bb: + br label %bb1 + +bb1: ; preds = %bb3, %bb + %i = phi i32 [ %i26, %bb3 ], [ 0, %bb ] + %i2 = phi i32 [ %i24, %bb3 ], [ 0, %bb ] + br label %bb3 + +bb3: ; preds = %bb1 + %i4 = zext i32 %i2 to i64 + %i5 = mul i64 %i4, 0 + %i10 = or i64 0, %i5 + %i11 = trunc i64 %i10 to i32 + %i12 = and i32 %i11, 0 + %i13 = zext i32 %i to i64 + %i14 = mul i64 %i13, 0 + %i19 = or i64 0, %i14 + %i20 = trunc i64 %i19 to i32 + %i21 = and i32 %i20, 0 + %i22 = or i32 %i12, %i21 + %i23 = icmp ult i32 %i22, 0 + %i24 = select i1 %i23, i32 0, i32 0 + %i25 = icmp ult i32 0, 0 + %i26 = select i1 %i25, i32 0, i32 0 + br label %bb1 +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/SimpleLoopUnswitch/pr117537.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/SimpleLoopUnswitch/pr117537.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/SimpleLoopUnswitch/pr117537.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/SimpleLoopUnswitch/pr117537.ll 2024-12-04 22:18:02.000000000 +0000 @@ -0,0 +1,92 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes='print,simple-loop-unswitch,print' -verify-scev < %s 2>/dev/null | FileCheck %s + +; Make sure we don't assert due to insufficient SCEV invalidation. + +define void @test(ptr %p) { +; CHECK-LABEL: define void @test( +; CHECK-SAME: ptr [[P:%.*]]) { +; CHECK-NEXT: [[ENTRY:.*:]] +; CHECK-NEXT: [[CHECK:%.*]] = icmp eq ptr [[P]], null +; CHECK-NEXT: br i1 [[CHECK]], label %[[ENTRY_SPLIT_US:.*]], label %[[ENTRY_SPLIT:.*]] +; CHECK: [[ENTRY_SPLIT_US]]: +; CHECK-NEXT: br label %[[BB0_US:.*]] +; CHECK: [[BB0_US]]: +; CHECK-NEXT: br label %[[LOOP0_US:.*]] +; CHECK: [[LOOP0_US]]: +; CHECK-NEXT: [[V_US:%.*]] = load atomic i32, ptr [[P]] unordered, align 8 +; CHECK-NEXT: [[ADD_US:%.*]] = add i32 [[V_US]], 3 +; CHECK-NEXT: br i1 true, label %[[PREHEADER_SPLIT_US:.*]], label %[[BB0_US]] +; CHECK: [[PREHEADER_SPLIT_US]]: +; CHECK-NEXT: [[ADD_LCSSA_US:%.*]] = phi i32 [ [[ADD_US]], %[[LOOP0_US]] ] +; CHECK-NEXT: br label %[[PREHEADER:.*]] +; CHECK: [[ENTRY_SPLIT]]: +; CHECK-NEXT: br label %[[BB0:.*]] +; CHECK: [[BB0]]: +; CHECK-NEXT: br label %[[LATCH:.*]] +; CHECK: [[LATCH]]: +; CHECK-NEXT: br i1 false, label %[[EXIT0:.*]], label %[[LOOP0:.*]] +; CHECK: [[EXIT0]]: +; CHECK-NEXT: ret void +; CHECK: [[LOOP0]]: +; CHECK-NEXT: [[V:%.*]] = load atomic i32, ptr [[P]] unordered, align 8 +; CHECK-NEXT: [[ADD:%.*]] = add i32 [[V]], 3 +; CHECK-NEXT: br i1 true, label %[[PREHEADER_SPLIT:.*]], label %[[BB0]] +; CHECK: [[PREHEADER_SPLIT]]: +; CHECK-NEXT: [[ADD_LCSSA:%.*]] = phi i32 [ [[ADD]], %[[LOOP0]] ] +; CHECK-NEXT: br label %[[PREHEADER]] +; CHECK: [[PREHEADER]]: +; CHECK-NEXT: [[DOTUS_PHI:%.*]] = phi i32 [ [[ADD_LCSSA]], %[[PREHEADER_SPLIT]] ], [ [[ADD_LCSSA_US]], %[[PREHEADER_SPLIT_US]] ] +; CHECK-NEXT: br label %[[LOOP1:.*]] +; CHECK: [[LOOP1]]: +; CHECK-NEXT: [[IV1:%.*]] = phi i32 [ [[DOTUS_PHI]], %[[PREHEADER]] ], [ [[IV1_NEXT:%.*]], %[[BACKEDGE:.*]] ] +; CHECK-NEXT: [[IV1_NEXT]] = add i32 [[IV1]], -33 +; CHECK-NEXT: br label %[[LOOP2:.*]] +; CHECK: [[BACKEDGE]]: +; CHECK-NEXT: br i1 true, label %[[EXIT1:.*]], label %[[LOOP1]] +; CHECK: [[LOOP2]]: +; CHECK-NEXT: [[IV0:%.*]] = phi i32 [ [[IV1]], %[[LOOP1]] ], [ [[IV0_NEXT:%.*]], %[[LOOP2]] ] +; CHECK-NEXT: [[IV0_NEXT]] = add nsw i32 [[IV0]], 1 +; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[IV0_NEXT]], 0 +; CHECK-NEXT: br i1 [[CMP]], label %[[BACKEDGE]], label %[[LOOP2]] +; CHECK: [[EXIT1]]: +; CHECK-NEXT: ret void +; +entry: + %check = icmp eq ptr %p, null + br label %bb0 + +bb0: ; preds = %loop0, %entry + br i1 %check, label %loop0, label %latch + +latch: ; preds = %bb0 + br i1 %check, label %exit0, label %loop0 + +exit0: ; preds = %latch + ret void + +loop0: ; preds = %latch, %bb0 + %v = load atomic i32, ptr %p unordered, align 8 + %add = add i32 %v, 3 + br i1 true, label %preheader, label %bb0 + +preheader: ; preds = %loop0 + br label %loop1 + +loop1: ; preds = %backedge, %preheader + %iv1 = phi i32 [ %add, %preheader ], [ %iv1.next, %backedge ] + %iv1.next = add i32 %iv1, -33 + br label %loop2 + +backedge: ; preds = %loop2 + br i1 true, label %exit1, label %loop1 + +loop2: ; preds = %loop2, %loop1 + %iv0 = phi i32 [ %iv1, %loop1 ], [ %iv0.next, %loop2 ] + %iv0.next = add nsw i32 %iv0, 1 + %cmp = icmp sgt i32 %iv0.next, 0 + br i1 %cmp, label %backedge, label %loop2 + +exit1: ; preds = %backedge + ret void +} diff -Nru llvm-toolchain-19-19.1.4/llvm/test/Transforms/SimplifyCFG/switch-branch-fold-indirectbr-102351.ll llvm-toolchain-19-19.1.7/llvm/test/Transforms/SimplifyCFG/switch-branch-fold-indirectbr-102351.ll --- llvm-toolchain-19-19.1.4/llvm/test/Transforms/SimplifyCFG/switch-branch-fold-indirectbr-102351.ll 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/test/Transforms/SimplifyCFG/switch-branch-fold-indirectbr-102351.ll 2024-12-04 12:12:01.000000000 +0000 @@ -0,0 +1,81 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --prefix-filecheck-ir-name pref --version 5 +; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s + +define i32 @foo.1(i32 %arg, ptr %arg1) { +; CHECK-LABEL: define i32 @foo.1( +; CHECK-SAME: i32 [[ARG:%.*]], ptr [[ARG1:%.*]]) { +; CHECK-NEXT: [[BB:.*]]: +; CHECK-NEXT: [[ALLOCA:%.*]] = alloca [2 x ptr], align 16 +; CHECK-NEXT: store ptr blockaddress(@foo.1, %[[BB8:.*]]), ptr [[ALLOCA]], align 16 +; CHECK-NEXT: [[GETELEMENTPTR:%.*]] = getelementptr inbounds [2 x ptr], ptr [[ALLOCA]], i64 0, i64 1 +; CHECK-NEXT: store ptr blockaddress(@foo.1, %[[BB16:.*]]), ptr [[GETELEMENTPTR]], align 8 +; CHECK-NEXT: br label %[[PREFBB2:.*]] +; CHECK: [[PREFBB2]]: +; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ 0, %[[BB]] ], [ [[PHI14:%.*]], %[[BB13:.*]] ] +; CHECK-NEXT: [[PHI3:%.*]] = phi i32 [ 0, %[[BB]] ], [ [[PHI15:%.*]], %[[BB13]] ] +; CHECK-NEXT: switch i32 [[PHI]], label %[[BB13]] [ +; CHECK-NEXT: i32 0, label %[[PREFBB18:.*]] +; CHECK-NEXT: i32 1, label %[[BB8]] +; CHECK-NEXT: i32 2, label %[[PREFBB11:.*]] +; CHECK-NEXT: ] +; CHECK: [[BB8]]: +; CHECK-NEXT: [[PHI10:%.*]] = phi i32 [ [[ARG]], %[[PREFBB18]] ], [ [[PHI3]], %[[PREFBB2]] ] +; CHECK-NEXT: br label %[[BB13]] +; CHECK: [[PREFBB11]]: +; CHECK-NEXT: [[CALL:%.*]] = call i32 @wombat(i32 noundef [[PHI3]]) +; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[PHI3]], 1 +; CHECK-NEXT: br label %[[PREFBB18]] +; CHECK: [[BB13]]: +; CHECK-NEXT: [[PHI14]] = phi i32 [ [[PHI]], %[[PREFBB2]] ], [ 2, %[[BB8]] ] +; CHECK-NEXT: [[PHI15]] = phi i32 [ [[PHI3]], %[[PREFBB2]] ], [ [[PHI10]], %[[BB8]] ] +; CHECK-NEXT: br label %[[PREFBB2]] +; CHECK: [[BB16]]: +; CHECK-NEXT: [[CALL17:%.*]] = call i32 @wombat(i32 noundef [[ARG]]) +; CHECK-NEXT: ret i32 0 +; CHECK: [[PREFBB18]]: +; CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr [[ARG1]], align 8 +; CHECK-NEXT: indirectbr ptr [[LOAD]], [label %[[BB8]], label %bb16] +; +bb: + %alloca = alloca [2 x ptr], align 16 + store ptr blockaddress(@foo.1, %bb8), ptr %alloca, align 16 + %getelementptr = getelementptr inbounds [2 x ptr], ptr %alloca, i64 0, i64 1 + store ptr blockaddress(@foo.1, %bb16), ptr %getelementptr, align 8 + br label %bb2 + +bb2: ; preds = %bb13, %bb + %phi = phi i32 [ 0, %bb ], [ %phi14, %bb13 ] + %phi3 = phi i32 [ 0, %bb ], [ %phi15, %bb13 ] + switch i32 %phi, label %bb13 [ + i32 0, label %bb5 + i32 1, label %bb8 + i32 2, label %bb11 + ] + +bb5: ; preds = %bb2 + br label %bb18 + +bb8: ; preds = %bb18, %bb2 + %phi10 = phi i32 [ %arg, %bb18 ], [ %phi3, %bb2 ] + br label %bb13 + +bb11: ; preds = %bb2 + %call = call i32 @wombat(i32 noundef %phi3) + %add = add nsw i32 %phi3, 1 + br label %bb18 + +bb13: ; preds = %bb8, %bb2 + %phi14 = phi i32 [ %phi, %bb2 ], [ 2, %bb8 ] + %phi15 = phi i32 [ %phi3, %bb2 ], [ %phi10, %bb8 ] + br label %bb2 + +bb16: ; preds = %bb18 + %call17 = call i32 @wombat(i32 noundef %arg) + ret i32 0 + +bb18: ; preds = %bb11, %bb5 + %load = load ptr, ptr %arg1, align 8 + indirectbr ptr %load, [label %bb8, label %bb16] +} + +declare i32 @wombat(i32) diff -Nru llvm-toolchain-19-19.1.4/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp llvm-toolchain-19-19.1.7/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp --- llvm-toolchain-19-19.1.4/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp 2025-01-14 16:29:59.000000000 +0000 @@ -3042,6 +3042,14 @@ !N->getExtType(0).empty() && N->getExtType(0) == N->getChild(0).getExtType(0) && N->getName().empty()) { + if (!N->getPredicateCalls().empty()) { + std::string Str; + raw_string_ostream OS(Str); + OS << *N + << "\n trivial bitconvert node should not have predicate calls\n"; + PrintFatalError(Str); + return false; + } N = N->getChildShared(0); SimplifyTree(N); return true; diff -Nru llvm-toolchain-19-19.1.4/llvm/utils/gn/secondary/llvm/version.gni llvm-toolchain-19-19.1.7/llvm/utils/gn/secondary/llvm/version.gni --- llvm-toolchain-19-19.1.4/llvm/utils/gn/secondary/llvm/version.gni 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/utils/gn/secondary/llvm/version.gni 2025-01-14 16:29:59.000000000 +0000 @@ -1,4 +1,4 @@ llvm_version_major = 19 llvm_version_minor = 1 -llvm_version_patch = 4 +llvm_version_patch = 7 llvm_version = "$llvm_version_major.$llvm_version_minor.$llvm_version_patch" diff -Nru llvm-toolchain-19-19.1.4/llvm/utils/lit/lit/__init__.py llvm-toolchain-19-19.1.7/llvm/utils/lit/lit/__init__.py --- llvm-toolchain-19-19.1.4/llvm/utils/lit/lit/__init__.py 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/utils/lit/lit/__init__.py 2025-01-14 16:29:59.000000000 +0000 @@ -2,7 +2,7 @@ __author__ = "Daniel Dunbar" __email__ = "daniel@minormatter.com" -__versioninfo__ = (19, 1, 4) +__versioninfo__ = (19, 1, 7) __version__ = ".".join(str(v) for v in __versioninfo__) + "dev" __all__ = [] diff -Nru llvm-toolchain-19-19.1.4/llvm/utils/mlgo-utils/mlgo/__init__.py llvm-toolchain-19-19.1.7/llvm/utils/mlgo-utils/mlgo/__init__.py --- llvm-toolchain-19-19.1.4/llvm/utils/mlgo-utils/mlgo/__init__.py 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/llvm/utils/mlgo-utils/mlgo/__init__.py 2025-01-14 16:29:59.000000000 +0000 @@ -4,7 +4,7 @@ from datetime import timezone, datetime -__versioninfo__ = (19, 1, 4) +__versioninfo__ = (19, 1, 7) __version__ = ( ".".join(str(v) for v in __versioninfo__) + "dev" diff -Nru llvm-toolchain-19-19.1.4/offload/CMakeLists.txt llvm-toolchain-19-19.1.7/offload/CMakeLists.txt --- llvm-toolchain-19-19.1.4/offload/CMakeLists.txt 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/offload/CMakeLists.txt 2025-01-14 16:30:00.000000000 +0000 @@ -127,6 +127,7 @@ # Set up testing infrastructure. include(OpenMPTesting) +include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Werror=global-constructors OFFLOAD_HAVE_WERROR_CTOR) # LLVM source tree is required at build time for libomptarget @@ -282,6 +283,26 @@ ${LLVM_LIBRARY_DIRS} REQUIRED ) + + find_path ( + LIBOMP_INCLUDE_DIR + NAMES + omp.h + HINTS + ${COMPILER_RESOURCE_DIR}/include + ${CMAKE_INSTALL_PREFIX}/include + ) + + get_filename_component(LIBOMP_LIBRARY_DIR ${LIBOMP_STANDALONE} DIRECTORY) + + set(OPENMP_TEST_FLAGS "" CACHE STRING + "Extra compiler flags to send to the test compiler.") + set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING + "OpenMP compiler flag to use for testing OpenMP runtime libraries.") + set(LIBOMPTARGET_OPENMP_HEADER_FOLDER "${LIBOMP_INCLUDE_DIR}" CACHE STRING + "Path to folder containing omp.h") + set(LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER "${LIBOMP_LIBRARY_DIR}" CACHE STRING + "Path to folder containing libomp.so, and libLLVMSupport.so with profiling enabled") endif() macro(pythonize_bool var) diff -Nru llvm-toolchain-19-19.1.4/offload/cmake/OpenMPTesting.cmake llvm-toolchain-19-19.1.7/offload/cmake/OpenMPTesting.cmake --- llvm-toolchain-19-19.1.4/offload/cmake/OpenMPTesting.cmake 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/offload/cmake/OpenMPTesting.cmake 2025-01-14 16:30:00.000000000 +0000 @@ -124,7 +124,7 @@ # project is built which is too late for detecting the compiler... file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DetectTestCompiler) execute_process( - COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/DetectTestCompiler + COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${CMAKE_CURRENT_SOURCE_DIR}/../openmp/cmake/DetectTestCompiler -DCMAKE_C_COMPILER=${OPENMP_TEST_C_COMPILER} -DCMAKE_CXX_COMPILER=${OPENMP_TEST_CXX_COMPILER} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DetectTestCompiler diff -Nru llvm-toolchain-19-19.1.4/offload/plugins-nextgen/common/CMakeLists.txt llvm-toolchain-19-19.1.7/offload/plugins-nextgen/common/CMakeLists.txt --- llvm-toolchain-19-19.1.4/offload/plugins-nextgen/common/CMakeLists.txt 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/offload/plugins-nextgen/common/CMakeLists.txt 2025-01-14 16:30:00.000000000 +0000 @@ -11,13 +11,15 @@ # Only enable JIT for those targets that LLVM can support. set(supported_jit_targets AMDGPU NVPTX) -foreach(target IN LISTS supported_jit_targets) - if("${target}" IN_LIST LLVM_TARGETS_TO_BUILD) - target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}") - llvm_map_components_to_libnames(llvm_libs ${target}) - target_link_libraries(PluginCommon PRIVATE ${llvm_libs}) - endif() -endforeach() +if (NOT LLVM_LINK_LLVM_DYLIB) + foreach(target IN LISTS supported_jit_targets) + if("${target}" IN_LIST LLVM_TARGETS_TO_BUILD) + target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}") + llvm_map_components_to_libnames(llvm_libs ${target}) + target_link_libraries(PluginCommon PRIVATE ${llvm_libs}) + endif() + endforeach() +endif() # Include the RPC server from the `libc` project if availible. if(TARGET llvmlibc_rpc_server AND ${LIBOMPTARGET_GPU_LIBC_SUPPORT}) diff -Nru llvm-toolchain-19-19.1.4/offload/test/CMakeLists.txt llvm-toolchain-19-19.1.7/offload/test/CMakeLists.txt --- llvm-toolchain-19-19.1.4/offload/test/CMakeLists.txt 2024-11-26 09:13:22.000000000 +0000 +++ llvm-toolchain-19-19.1.7/offload/test/CMakeLists.txt 2025-01-14 16:30:00.000000000 +0000 @@ -22,6 +22,11 @@ get_filename_component(CUDA_LIBDIR "${CUDA_cudart_static_LIBRARY}" DIRECTORY) endif() +set(OMP_DEPEND) +if(TARGET omp) + set(OMP_DEPEND omp) +endif() + string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}") foreach(CURRENT_TARGET IN LISTS SYSTEM_TARGETS) string(STRIP "${CURRENT_TARGET}" CURRENT_TARGET) @@ -29,7 +34,7 @@ add_offload_testsuite(check-libomptarget-${CURRENT_TARGET} "Running libomptarget tests" ${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET} - DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS} + DEPENDS omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS} ARGS ${LIBOMPTARGET_LIT_ARG_LIST}) list(APPEND LIBOMPTARGET_LIT_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET}) @@ -43,12 +48,12 @@ "Running libomptarget tests" ${LIBOMPTARGET_LIT_TESTSUITES} EXCLUDE_FROM_CHECK_ALL - DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS} + DEPENDS omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS} ARGS ${LIBOMPTARGET_LIT_ARG_LIST}) add_offload_testsuite(check-offload "Running libomptarget tests" ${LIBOMPTARGET_LIT_TESTSUITES} EXCLUDE_FROM_CHECK_ALL - DEPENDS omptarget omp ${LIBOMPTARGET_TESTED_PLUGINS} + DEPENDS omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS} ARGS ${LIBOMPTARGET_LIT_ARG_LIST})