From 65150af1b4841feeb8b81f1ada60de1191912590 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 19 Oct 2021 10:24:26 -0700 Subject: [PATCH 1/4] Update the minimum external LLVM to 11 --- .github/workflows/ci.yml | 4 +- compiler/rustc_codegen_llvm/src/llvm_util.rs | 3 +- .../llvm-wrapper/CoverageMappingWrapper.cpp | 7 -- .../rustc_llvm/llvm-wrapper/PassWrapper.cpp | 93 ------------------- .../rustc_llvm/llvm-wrapper/RustWrapper.cpp | 14 --- src/bootstrap/native.rs | 4 +- .../Dockerfile | 9 +- src/ci/github-actions/ci.yml | 4 +- src/test/assembly/asm/aarch64-modifiers.rs | 1 - src/test/assembly/asm/aarch64-types.rs | 1 - src/test/assembly/asm/arm-modifiers.rs | 1 - src/test/assembly/asm/arm-types.rs | 1 - src/test/assembly/asm/global_asm.rs | 1 - src/test/assembly/asm/hexagon-types.rs | 1 - src/test/assembly/asm/mips-types.rs | 1 - src/test/assembly/asm/nvptx-types.rs | 1 - src/test/assembly/asm/powerpc-types.rs | 2 +- src/test/assembly/asm/riscv-types.rs | 1 - src/test/assembly/asm/s390x-types.rs | 1 - src/test/assembly/asm/wasm-types.rs | 2 +- src/test/assembly/asm/x86-modifiers.rs | 1 - src/test/assembly/asm/x86-types.rs | 1 - src/test/codegen/alloc-optimisation.rs | 1 - src/test/codegen/asm-powerpc-clobbers.rs | 1 - .../binary-search-index-no-bound-check.rs | 1 - .../codegen/enum-bounds-check-derived-idx.rs | 1 - .../codegen/enum-bounds-check-issue-13926.rs | 1 - .../codegen/enum-bounds-check-issue-82871.rs | 1 - src/test/codegen/issue-27130.rs | 1 - ...issue-73396-bounds-check-after-position.rs | 1 - ...sue-73827-bounds-check-index-in-subexpr.rs | 1 - .../src-hash-algorithm-sha256.rs | 1 - src/test/codegen/vec-in-place.rs | 1 - .../coverage-llvmir/Makefile | 1 - .../coverage-reports/Makefile | 1 - .../split-debuginfo/Makefile | 2 - .../run-make-fulldeps/split-dwarf/Makefile | 1 - src/test/ui/asm/aarch64/const.rs | 1 - src/test/ui/asm/aarch64/srcloc.rs | 1 - src/test/ui/asm/aarch64/sym.rs | 1 - src/test/ui/asm/x86_64/const.rs | 1 - src/test/ui/asm/x86_64/srcloc.rs | 1 - src/test/ui/asm/x86_64/srcloc.stderr | 48 +++++----- src/test/ui/asm/x86_64/sym.rs | 2 +- .../cmse-nonsecure-call/params-on-stack.rs | 1 - .../cmse-nonsecure-entry/params-on-stack.rs | 2 +- .../issue-69225-SCEVAddExpr-wrap-flag.rs | 1 - 47 files changed, 40 insertions(+), 189 deletions(-) rename src/ci/docker/host-x86_64/{x86_64-gnu-llvm-10 => x86_64-gnu-llvm-11}/Dockerfile (93%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d921286ba3489..5ce1d4b2d4eca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: mingw-check os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-10 + - name: x86_64-gnu-llvm-11 os: ubuntu-latest-xl env: {} - name: x86_64-gnu-tools @@ -274,7 +274,7 @@ jobs: - name: x86_64-gnu-distcheck os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-10 + - name: x86_64-gnu-llvm-11 env: RUST_BACKTRACE: 1 os: ubuntu-latest-xl diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index b15efcd0dc2b1..4e4487ad88ceb 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -95,8 +95,7 @@ unsafe fn configure_llvm(sess: &Session) { // Ref: // - https://github.com/rust-lang/rust/issues/85351 // - https://reviews.llvm.org/D103167 - let llvm_version = llvm_util::get_version(); - if llvm_version >= (11, 0, 0) && llvm_version < (13, 0, 0) { + if llvm_util::get_version() < (13, 0, 0) { add("-enable-machine-outliner=never", false); } diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp index 35cca04b20f75..8cd2bd12450e3 100644 --- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp @@ -98,10 +98,7 @@ extern "C" void LLVMRustCoverageWriteMapSectionNameToString(LLVMModuleRef M, extern "C" void LLVMRustCoverageWriteFuncSectionNameToString(LLVMModuleRef M, RustStringRef Str) { -#if LLVM_VERSION_GE(11, 0) WriteSectionNameToString(M, IPSK_covfun, Str); -// else do nothing; the `Version` check will abort codegen on the Rust side -#endif } extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) { @@ -111,9 +108,5 @@ extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) { } extern "C" uint32_t LLVMRustCoverageMappingVersion() { -#if LLVM_VERSION_GE(11, 0) return coverage::CovMapVersion::Version4; -#else - return coverage::CovMapVersion::Version3; -#endif } diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 6d2e7d25336de..dcf81dd7eb5b7 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -54,10 +54,6 @@ typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef; DEFINE_STDCXX_CONVERSION_FUNCTIONS(Pass, LLVMPassRef) DEFINE_STDCXX_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef) -#if LLVM_VERSION_LT(11, 0) -DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBuilder, - LLVMPassManagerBuilderRef) -#endif extern "C" void LLVMInitializePasses() { PassRegistry &Registry = *PassRegistry::getPassRegistry(); @@ -857,13 +853,8 @@ LLVMRustOptimizeWithNewPassManager( // PassBuilder does not create a pipeline. std::vector> PipelineStartEPCallbacks; -#if LLVM_VERSION_GE(11, 0) std::vector> OptimizerLastEPCallbacks; -#else - std::vector> - OptimizerLastEPCallbacks; -#endif if (VerifyIR) { PipelineStartEPCallbacks.push_back( @@ -896,7 +887,6 @@ LLVMRustOptimizeWithNewPassManager( SanitizerOptions->SanitizeMemoryTrackOrigins, SanitizerOptions->SanitizeMemoryRecover, /*CompileKernel=*/false); -#if LLVM_VERSION_GE(11, 0) OptimizerLastEPCallbacks.push_back( [Options](ModulePassManager &MPM, OptimizationLevel Level) { #if LLVM_VERSION_GE(14, 0) @@ -907,22 +897,9 @@ LLVMRustOptimizeWithNewPassManager( MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass(Options))); } ); -#else - PipelineStartEPCallbacks.push_back( - [Options](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(MemorySanitizerPass(Options)); - } - ); - OptimizerLastEPCallbacks.push_back( - [Options](FunctionPassManager &FPM, OptimizationLevel Level) { - FPM.addPass(MemorySanitizerPass(Options)); - } - ); -#endif } if (SanitizerOptions->SanitizeThread) { -#if LLVM_VERSION_GE(11, 0) OptimizerLastEPCallbacks.push_back( [](ModulePassManager &MPM, OptimizationLevel Level) { #if LLVM_VERSION_GE(14, 0) @@ -933,22 +910,9 @@ LLVMRustOptimizeWithNewPassManager( MPM.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass())); } ); -#else - PipelineStartEPCallbacks.push_back( - [](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(ThreadSanitizerPass()); - } - ); - OptimizerLastEPCallbacks.push_back( - [](FunctionPassManager &FPM, OptimizationLevel Level) { - FPM.addPass(ThreadSanitizerPass()); - } - ); -#endif } if (SanitizerOptions->SanitizeAddress) { -#if LLVM_VERSION_GE(11, 0) OptimizerLastEPCallbacks.push_back( [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { MPM.addPass(RequireAnalysisPass()); @@ -967,29 +931,8 @@ LLVMRustOptimizeWithNewPassManager( #endif } ); -#else - PipelineStartEPCallbacks.push_back( - [&](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(RequireAnalysisPass()); - } - ); - OptimizerLastEPCallbacks.push_back( - [SanitizerOptions](FunctionPassManager &FPM, OptimizationLevel Level) { - FPM.addPass(AddressSanitizerPass( - /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover, - /*UseAfterScope=*/true)); - } - ); - PipelineStartEPCallbacks.push_back( - [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(ModuleAddressSanitizerPass( - /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover)); - } - ); -#endif } if (SanitizerOptions->SanitizeHWAddress) { -#if LLVM_VERSION_GE(11, 0) OptimizerLastEPCallbacks.push_back( [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { #if LLVM_VERSION_GE(14, 0) @@ -1003,14 +946,6 @@ LLVMRustOptimizeWithNewPassManager( #endif } ); -#else - PipelineStartEPCallbacks.push_back( - [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(HWAddressSanitizerPass( - /*CompileKernel=*/false, SanitizerOptions->SanitizeHWAddressRecover)); - } - ); -#endif } } @@ -1037,17 +972,8 @@ LLVMRustOptimizeWithNewPassManager( for (const auto &C : PipelineStartEPCallbacks) C(MPM, OptLevel); -# if LLVM_VERSION_GE(11, 0) for (const auto &C : OptimizerLastEPCallbacks) C(MPM, OptLevel); -# else - if (!OptimizerLastEPCallbacks.empty()) { - FunctionPassManager FPM(DebugPassManager); - for (const auto &C : OptimizerLastEPCallbacks) - C(FPM, OptLevel); - MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); - } -# endif MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers)); @@ -1088,17 +1014,8 @@ LLVMRustOptimizeWithNewPassManager( #else MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager); #endif -#if LLVM_VERSION_GE(11, 0) for (const auto &C : OptimizerLastEPCallbacks) C(MPM, OptLevel); -#else - if (!OptimizerLastEPCallbacks.empty()) { - FunctionPassManager FPM(DebugPassManager); - for (const auto &C : OptimizerLastEPCallbacks) - C(FPM, OptLevel); - MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); - } -#endif break; case LLVMRustOptStage::PreLinkFatLTO: #if LLVM_VERSION_GE(12, 0) @@ -1552,7 +1469,6 @@ LLVMRustFreeThinLTOData(LLVMRustThinLTOData *Data) { // `ProcessThinLTOModule` function. Here they're split up into separate steps // so rustc can save off the intermediate bytecode between each step. -#if LLVM_VERSION_GE(11, 0) static bool clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) { // When linking an ELF shared object, dso_local should be dropped. We @@ -1563,7 +1479,6 @@ clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) { Mod.getPIELevel() == PIELevel::Default; return ClearDSOLocalOnDeclarations; } -#endif extern "C" bool LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data, LLVMModuleRef M, @@ -1571,12 +1486,8 @@ LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data, LLVMModuleRef M, Module &Mod = *unwrap(M); TargetMachine &Target = *unwrap(TM); -#if LLVM_VERSION_GE(11, 0) bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target); bool error = renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal); -#else - bool error = renameModuleForThinLTO(Mod, Data->Index); -#endif if (error) { LLVMRustSetLastError("renameModuleForThinLTO failed"); @@ -1645,12 +1556,8 @@ LLVMRustPrepareThinLTOImport(const LLVMRustThinLTOData *Data, LLVMModuleRef M, return MOrErr; }; -#if LLVM_VERSION_GE(11, 0) bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target); FunctionImporter Importer(Data->Index, Loader, ClearDSOLocal); -#else - FunctionImporter Importer(Data->Index, Loader); -#endif Expected Result = Importer.importFunctions(Mod, ImportList); if (!Result) { LLVMRustSetLastError(toString(Result.takeError()).c_str()); diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index b7b0524e2a388..3ce98b177ad58 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -681,10 +681,8 @@ static Optional fromRust(LLVMRustChecksumKind Kind) { return DIFile::ChecksumKind::CSK_MD5; case LLVMRustChecksumKind::SHA1: return DIFile::ChecksumKind::CSK_SHA1; -#if (LLVM_VERSION_MAJOR >= 11) case LLVMRustChecksumKind::SHA256: return DIFile::ChecksumKind::CSK_SHA256; -#endif default: report_fatal_error("bad ChecksumKind."); } @@ -999,14 +997,9 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateUnionType( extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTemplateTypeParameter( LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef Ty) { -#if LLVM_VERSION_GE(11, 0) bool IsDefault = false; // FIXME: should we ever set this true? return wrap(Builder->createTemplateTypeParameter( unwrapDI(Scope), StringRef(Name, NameLen), unwrapDI(Ty), IsDefault)); -#else - return wrap(Builder->createTemplateTypeParameter( - unwrapDI(Scope), StringRef(Name, NameLen), unwrapDI(Ty))); -#endif } extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateNameSpace( @@ -1246,23 +1239,16 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) { return LLVMArrayTypeKind; case Type::PointerTyID: return LLVMPointerTypeKind; -#if LLVM_VERSION_GE(11, 0) case Type::FixedVectorTyID: return LLVMVectorTypeKind; -#else - case Type::VectorTyID: - return LLVMVectorTypeKind; -#endif case Type::X86_MMXTyID: return LLVMX86_MMXTypeKind; case Type::TokenTyID: return LLVMTokenTypeKind; -#if LLVM_VERSION_GE(11, 0) case Type::ScalableVectorTyID: return LLVMScalableVectorTypeKind; case Type::BFloatTyID: return LLVMBFloatTypeKind; -#endif #if LLVM_VERSION_GE(12, 0) case Type::X86_AMXTyID: return LLVMX86_AMXTypeKind; diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 6bfaeffa80705..c4125ba0be0c1 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -378,11 +378,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) { let version = output(cmd.arg("--version")); let mut parts = version.split('.').take(2).filter_map(|s| s.parse::().ok()); if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) { - if major >= 10 { + if major >= 11 { return; } } - panic!("\n\nbad LLVM version: {}, need >=10.0\n\n", version) + panic!("\n\nbad LLVM version: {}, need >=11.0\n\n", version) } fn configure_cmake( diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-10/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile similarity index 93% rename from src/ci/docker/host-x86_64/x86_64-gnu-llvm-10/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile index c34198708c462..45b555146cfb2 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-10/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ gcc-multilib \ @@ -13,8 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ sudo \ gdb \ - llvm-10-tools \ - llvm-10-dev \ + llvm-11-tools \ + llvm-11-dev \ libedit-dev \ libssl-dev \ pkg-config \ @@ -28,7 +29,7 @@ RUN sh /scripts/sccache.sh # using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-10 \ + --llvm-root=/usr/lib/llvm-11 \ --enable-llvm-link-shared \ --set rust.thin-lto-import-instr-limit=10 diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index eb16cf3c7620a..904e563787044 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -284,7 +284,7 @@ jobs: - name: mingw-check <<: *job-linux-xl - - name: x86_64-gnu-llvm-10 + - name: x86_64-gnu-llvm-11 <<: *job-linux-xl - name: x86_64-gnu-tools @@ -431,7 +431,7 @@ jobs: - name: x86_64-gnu-distcheck <<: *job-linux-xl - - name: x86_64-gnu-llvm-10 + - name: x86_64-gnu-llvm-11 env: RUST_BACKTRACE: 1 <<: *job-linux-xl diff --git a/src/test/assembly/asm/aarch64-modifiers.rs b/src/test/assembly/asm/aarch64-modifiers.rs index d4a44b17392be..5196aa9fa1759 100644 --- a/src/test/assembly/asm/aarch64-modifiers.rs +++ b/src/test/assembly/asm/aarch64-modifiers.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: -O // compile-flags: --target aarch64-unknown-linux-gnu diff --git a/src/test/assembly/asm/aarch64-types.rs b/src/test/assembly/asm/aarch64-types.rs index aa25562d32359..66c39a48c6e1d 100644 --- a/src/test/assembly/asm/aarch64-types.rs +++ b/src/test/assembly/asm/aarch64-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: --target aarch64-unknown-linux-gnu // needs-llvm-components: aarch64 diff --git a/src/test/assembly/asm/arm-modifiers.rs b/src/test/assembly/asm/arm-modifiers.rs index bb6cc1c987356..a6985a3bf5c6b 100644 --- a/src/test/assembly/asm/arm-modifiers.rs +++ b/src/test/assembly/asm/arm-modifiers.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: -O // compile-flags: --target armv7-unknown-linux-gnueabihf diff --git a/src/test/assembly/asm/arm-types.rs b/src/test/assembly/asm/arm-types.rs index b16fde571afac..c848e3284ff1f 100644 --- a/src/test/assembly/asm/arm-types.rs +++ b/src/test/assembly/asm/arm-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: --target armv7-unknown-linux-gnueabihf // compile-flags: -C target-feature=+neon diff --git a/src/test/assembly/asm/global_asm.rs b/src/test/assembly/asm/global_asm.rs index 3a7f2fa1efb6b..1c981040d6014 100644 --- a/src/test/assembly/asm/global_asm.rs +++ b/src/test/assembly/asm/global_asm.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-x86_64 // assembly-output: emit-asm // compile-flags: -C llvm-args=--x86-asm-syntax=intel diff --git a/src/test/assembly/asm/hexagon-types.rs b/src/test/assembly/asm/hexagon-types.rs index 40352cdb4cdf2..2156d77233d83 100644 --- a/src/test/assembly/asm/hexagon-types.rs +++ b/src/test/assembly/asm/hexagon-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: --target hexagon-unknown-linux-musl // needs-llvm-components: hexagon diff --git a/src/test/assembly/asm/mips-types.rs b/src/test/assembly/asm/mips-types.rs index 9ec7ba83c4278..eb6627639f159 100644 --- a/src/test/assembly/asm/mips-types.rs +++ b/src/test/assembly/asm/mips-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: mips32 mips64 // assembly-output: emit-asm //[mips32] compile-flags: --target mips-unknown-linux-gnu diff --git a/src/test/assembly/asm/nvptx-types.rs b/src/test/assembly/asm/nvptx-types.rs index 75b6371fb7095..cc816fd78f81e 100644 --- a/src/test/assembly/asm/nvptx-types.rs +++ b/src/test/assembly/asm/nvptx-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // assembly-output: emit-asm // compile-flags: --target nvptx64-nvidia-cuda // compile-flags: --crate-type cdylib diff --git a/src/test/assembly/asm/powerpc-types.rs b/src/test/assembly/asm/powerpc-types.rs index 55ca8ee836c98..e2904cd3f87f6 100644 --- a/src/test/assembly/asm/powerpc-types.rs +++ b/src/test/assembly/asm/powerpc-types.rs @@ -1,4 +1,4 @@ -// min-llvm-version: 10.0.1 +// min-llvm-version: 12.0.0 // revisions: powerpc powerpc64 // assembly-output: emit-asm //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu diff --git a/src/test/assembly/asm/riscv-types.rs b/src/test/assembly/asm/riscv-types.rs index e62a6197b9a5e..0fe371c08397d 100644 --- a/src/test/assembly/asm/riscv-types.rs +++ b/src/test/assembly/asm/riscv-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: riscv64 riscv32 // assembly-output: emit-asm //[riscv64] compile-flags: --target riscv64imac-unknown-none-elf diff --git a/src/test/assembly/asm/s390x-types.rs b/src/test/assembly/asm/s390x-types.rs index 69d9cab23c8ed..b8a4ca08df1cc 100644 --- a/src/test/assembly/asm/s390x-types.rs +++ b/src/test/assembly/asm/s390x-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: s390x // assembly-output: emit-asm //[s390x] compile-flags: --target s390x-unknown-linux-gnu diff --git a/src/test/assembly/asm/wasm-types.rs b/src/test/assembly/asm/wasm-types.rs index a071a850c22b5..1a356e3e5f16e 100644 --- a/src/test/assembly/asm/wasm-types.rs +++ b/src/test/assembly/asm/wasm-types.rs @@ -1,4 +1,4 @@ -// min-llvm-version: 10.0.1 +// min-llvm-version: 12.0.0 // assembly-output: emit-asm // compile-flags: --target wasm32-unknown-unknown // compile-flags: --crate-type cdylib diff --git a/src/test/assembly/asm/x86-modifiers.rs b/src/test/assembly/asm/x86-modifiers.rs index c926fd7b3f565..574fdf12cd040 100644 --- a/src/test/assembly/asm/x86-modifiers.rs +++ b/src/test/assembly/asm/x86-modifiers.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: x86_64 i686 // assembly-output: emit-asm // compile-flags: -O diff --git a/src/test/assembly/asm/x86-types.rs b/src/test/assembly/asm/x86-types.rs index d25f3a03777a6..81be79cbaac18 100644 --- a/src/test/assembly/asm/x86-types.rs +++ b/src/test/assembly/asm/x86-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: x86_64 i686 // assembly-output: emit-asm //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu diff --git a/src/test/codegen/alloc-optimisation.rs b/src/test/codegen/alloc-optimisation.rs index aee93b93e3737..c3ffaeb9547b3 100644 --- a/src/test/codegen/alloc-optimisation.rs +++ b/src/test/codegen/alloc-optimisation.rs @@ -1,6 +1,5 @@ // // no-system-llvm -// min-llvm-version: 10.0.1 // compile-flags: -O #![crate_type="lib"] diff --git a/src/test/codegen/asm-powerpc-clobbers.rs b/src/test/codegen/asm-powerpc-clobbers.rs index 91a82c6012029..ce13a7ff938c8 100644 --- a/src/test/codegen/asm-powerpc-clobbers.rs +++ b/src/test/codegen/asm-powerpc-clobbers.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // revisions: powerpc powerpc64 powerpc64le //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu //[powerpc] needs-llvm-components: powerpc diff --git a/src/test/codegen/binary-search-index-no-bound-check.rs b/src/test/codegen/binary-search-index-no-bound-check.rs index 110d1d55626f1..2deabcaa6c21f 100644 --- a/src/test/codegen/binary-search-index-no-bound-check.rs +++ b/src/test/codegen/binary-search-index-no-bound-check.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 11.0.0 // compile-flags: -O // ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/src/test/codegen/enum-bounds-check-derived-idx.rs b/src/test/codegen/enum-bounds-check-derived-idx.rs index 7e3773b6a3eb1..aa66c2ed08edb 100644 --- a/src/test/codegen/enum-bounds-check-derived-idx.rs +++ b/src/test/codegen/enum-bounds-check-derived-idx.rs @@ -1,7 +1,6 @@ // This test checks an optimization that is not guaranteed to work. This test case should not block // a future LLVM update. // compile-flags: -O -// min-llvm-version: 11.0 #![crate_type = "lib"] diff --git a/src/test/codegen/enum-bounds-check-issue-13926.rs b/src/test/codegen/enum-bounds-check-issue-13926.rs index ad029f0fa7399..b26945bc54940 100644 --- a/src/test/codegen/enum-bounds-check-issue-13926.rs +++ b/src/test/codegen/enum-bounds-check-issue-13926.rs @@ -1,7 +1,6 @@ // This test checks an optimization that is not guaranteed to work. This test case should not block // a future LLVM update. // compile-flags: -O -// min-llvm-version: 11.0 #![crate_type = "lib"] diff --git a/src/test/codegen/enum-bounds-check-issue-82871.rs b/src/test/codegen/enum-bounds-check-issue-82871.rs index e779e2ef27439..a1fa1387d9441 100644 --- a/src/test/codegen/enum-bounds-check-issue-82871.rs +++ b/src/test/codegen/enum-bounds-check-issue-82871.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 11.0 #![crate_type = "lib"] diff --git a/src/test/codegen/issue-27130.rs b/src/test/codegen/issue-27130.rs index 7ae78782ff9d1..e5ee94e1f45e1 100644 --- a/src/test/codegen/issue-27130.rs +++ b/src/test/codegen/issue-27130.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 11.0 #![crate_type = "lib"] diff --git a/src/test/codegen/issue-73396-bounds-check-after-position.rs b/src/test/codegen/issue-73396-bounds-check-after-position.rs index e5f3ae45c07d3..8d07a67a1b451 100644 --- a/src/test/codegen/issue-73396-bounds-check-after-position.rs +++ b/src/test/codegen/issue-73396-bounds-check-after-position.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 11.0.0 // compile-flags: -O // ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/src/test/codegen/issue-73827-bounds-check-index-in-subexpr.rs b/src/test/codegen/issue-73827-bounds-check-index-in-subexpr.rs index d07eaa75b7a82..1ad05906e21ab 100644 --- a/src/test/codegen/issue-73827-bounds-check-index-in-subexpr.rs +++ b/src/test/codegen/issue-73827-bounds-check-index-in-subexpr.rs @@ -1,7 +1,6 @@ // This test checks that bounds checks are elided when // index is part of a (x | y) < C style condition -// min-llvm-version: 11.0.0 // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs b/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs index eaa9eafa1e872..dc7db8e23728e 100644 --- a/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs +++ b/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs @@ -1,5 +1,4 @@ // compile-flags: -g -Z src-hash-algorithm=sha256 -// min-llvm-version: 11.0 #![crate_type = "lib"] diff --git a/src/test/codegen/vec-in-place.rs b/src/test/codegen/vec-in-place.rs index 72ed7492be93c..a656c9e6f656a 100644 --- a/src/test/codegen/vec-in-place.rs +++ b/src/test/codegen/vec-in-place.rs @@ -1,6 +1,5 @@ // ignore-debug: the debug assertions get in the way // compile-flags: -O -// min-llvm-version: 11.0 #![crate_type = "lib"] // Ensure that trivial casts of vec elements are O(1) diff --git a/src/test/run-make-fulldeps/coverage-llvmir/Makefile b/src/test/run-make-fulldeps/coverage-llvmir/Makefile index 1ff1ffcc4b0b8..8722d9e10d91d 100644 --- a/src/test/run-make-fulldeps/coverage-llvmir/Makefile +++ b/src/test/run-make-fulldeps/coverage-llvmir/Makefile @@ -1,5 +1,4 @@ # needs-profiler-support -# min-llvm-version: 11.0 -include ../coverage/coverage_tools.mk diff --git a/src/test/run-make-fulldeps/coverage-reports/Makefile b/src/test/run-make-fulldeps/coverage-reports/Makefile index 78fbf811f12bf..4adf02bee0af4 100644 --- a/src/test/run-make-fulldeps/coverage-reports/Makefile +++ b/src/test/run-make-fulldeps/coverage-reports/Makefile @@ -1,6 +1,5 @@ # needs-profiler-support # ignore-windows-gnu -# min-llvm-version: 11.0 # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works # properly. Since we only have GCC on the CI ignore the test for now. diff --git a/src/test/run-make-fulldeps/split-debuginfo/Makefile b/src/test/run-make-fulldeps/split-debuginfo/Makefile index c89f2ae8349e5..e8e62efe01c14 100644 --- a/src/test/run-make-fulldeps/split-debuginfo/Makefile +++ b/src/test/run-make-fulldeps/split-debuginfo/Makefile @@ -1,7 +1,5 @@ -include ../tools.mk -# min-llvm-version: 11.0 - all: off packed unpacked ifeq ($(UNAME),Darwin) diff --git a/src/test/run-make-fulldeps/split-dwarf/Makefile b/src/test/run-make-fulldeps/split-dwarf/Makefile index f56b4168b2d66..ef61ff0450157 100644 --- a/src/test/run-make-fulldeps/split-dwarf/Makefile +++ b/src/test/run-make-fulldeps/split-dwarf/Makefile @@ -1,7 +1,6 @@ -include ../tools.mk # only-linux -# min-llvm-version: 11.0 all: $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g diff --git a/src/test/ui/asm/aarch64/const.rs b/src/test/ui/asm/aarch64/const.rs index 906dcb0ebab98..05165b2d46c0d 100644 --- a/src/test/ui/asm/aarch64/const.rs +++ b/src/test/ui/asm/aarch64/const.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-aarch64 // run-pass // revisions: mirunsafeck thirunsafeck diff --git a/src/test/ui/asm/aarch64/srcloc.rs b/src/test/ui/asm/aarch64/srcloc.rs index 58feb52653740..143ed1824039c 100644 --- a/src/test/ui/asm/aarch64/srcloc.rs +++ b/src/test/ui/asm/aarch64/srcloc.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-aarch64 // build-fail // compile-flags: -Ccodegen-units=1 diff --git a/src/test/ui/asm/aarch64/sym.rs b/src/test/ui/asm/aarch64/sym.rs index 6fd1192eec6e0..526555334cb88 100644 --- a/src/test/ui/asm/aarch64/sym.rs +++ b/src/test/ui/asm/aarch64/sym.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-aarch64 // only-linux // run-pass diff --git a/src/test/ui/asm/x86_64/const.rs b/src/test/ui/asm/x86_64/const.rs index d4de9abb8caf0..dbf1775572082 100644 --- a/src/test/ui/asm/x86_64/const.rs +++ b/src/test/ui/asm/x86_64/const.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-x86_64 // run-pass // revisions: mirunsafeck thirunsafeck diff --git a/src/test/ui/asm/x86_64/srcloc.rs b/src/test/ui/asm/x86_64/srcloc.rs index ed8cefc58b727..c4ccfb8016a77 100644 --- a/src/test/ui/asm/x86_64/srcloc.rs +++ b/src/test/ui/asm/x86_64/srcloc.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 10.0.1 // only-x86_64 // build-fail // compile-flags: -Ccodegen-units=1 diff --git a/src/test/ui/asm/x86_64/srcloc.stderr b/src/test/ui/asm/x86_64/srcloc.stderr index b62c8948289dd..77894657292fb 100644 --- a/src/test/ui/asm/x86_64/srcloc.stderr +++ b/src/test/ui/asm/x86_64/srcloc.stderr @@ -1,5 +1,5 @@ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:11:15 + --> $DIR/srcloc.rs:10:15 | LL | asm!("invalid_instruction"); | ^ @@ -11,7 +11,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:15:13 + --> $DIR/srcloc.rs:14:13 | LL | invalid_instruction | ^ @@ -23,7 +23,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:20:13 + --> $DIR/srcloc.rs:19:13 | LL | invalid_instruction | ^ @@ -35,7 +35,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:26:13 + --> $DIR/srcloc.rs:25:13 | LL | invalid_instruction | ^ @@ -47,7 +47,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:33:13 + --> $DIR/srcloc.rs:32:13 | LL | invalid_instruction | ^ @@ -59,7 +59,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:38:14 + --> $DIR/srcloc.rs:37:14 | LL | asm!(concat!("invalid", "_", "instruction")); | ^ @@ -71,7 +71,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ warning: scale factor without index register is ignored - --> $DIR/srcloc.rs:41:15 + --> $DIR/srcloc.rs:40:15 | LL | asm!("movaps %xmm3, (%esi, 2)", options(att_syntax)); | ^ @@ -83,7 +83,7 @@ LL | movaps %xmm3, (%esi, 2) | ^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:45:14 + --> $DIR/srcloc.rs:44:14 | LL | "invalid_instruction", | ^ @@ -95,7 +95,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:51:14 + --> $DIR/srcloc.rs:50:14 | LL | "invalid_instruction", | ^ @@ -107,7 +107,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:58:14 + --> $DIR/srcloc.rs:57:14 | LL | "invalid_instruction", | ^ @@ -119,7 +119,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:65:13 + --> $DIR/srcloc.rs:64:13 | LL | concat!("invalid", "_", "instruction"), | ^ @@ -131,7 +131,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction' - --> $DIR/srcloc.rs:72:13 + --> $DIR/srcloc.rs:71:13 | LL | concat!("invalid", "_", "instruction"), | ^ @@ -143,7 +143,7 @@ LL | invalid_instruction | ^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction1' - --> $DIR/srcloc.rs:79:14 + --> $DIR/srcloc.rs:78:14 | LL | "invalid_instruction1", | ^ @@ -155,7 +155,7 @@ LL | invalid_instruction1 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction2' - --> $DIR/srcloc.rs:80:14 + --> $DIR/srcloc.rs:79:14 | LL | "invalid_instruction2", | ^ @@ -167,7 +167,7 @@ LL | invalid_instruction2 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction1' - --> $DIR/srcloc.rs:86:13 + --> $DIR/srcloc.rs:85:13 | LL | concat!( | ^ @@ -179,7 +179,7 @@ LL | invalid_instruction1 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction2' - --> $DIR/srcloc.rs:86:13 + --> $DIR/srcloc.rs:85:13 | LL | concat!( | ^ @@ -191,7 +191,7 @@ LL | invalid_instruction2 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction1' - --> $DIR/srcloc.rs:95:13 + --> $DIR/srcloc.rs:94:13 | LL | concat!( | ^ @@ -203,7 +203,7 @@ LL | invalid_instruction1 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction2' - --> $DIR/srcloc.rs:95:13 + --> $DIR/srcloc.rs:94:13 | LL | concat!( | ^ @@ -215,7 +215,7 @@ LL | invalid_instruction2 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction3' - --> $DIR/srcloc.rs:99:13 + --> $DIR/srcloc.rs:98:13 | LL | concat!( | ^ @@ -227,7 +227,7 @@ LL | invalid_instruction3 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction4' - --> $DIR/srcloc.rs:99:13 + --> $DIR/srcloc.rs:98:13 | LL | concat!( | ^ @@ -239,7 +239,7 @@ LL | invalid_instruction4 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction1' - --> $DIR/srcloc.rs:110:13 + --> $DIR/srcloc.rs:109:13 | LL | concat!( | ^ @@ -251,7 +251,7 @@ LL | invalid_instruction1 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction2' - --> $DIR/srcloc.rs:110:13 + --> $DIR/srcloc.rs:109:13 | LL | concat!( | ^ @@ -263,7 +263,7 @@ LL | invalid_instruction2 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction3' - --> $DIR/srcloc.rs:114:13 + --> $DIR/srcloc.rs:113:13 | LL | concat!( | ^ @@ -275,7 +275,7 @@ LL | invalid_instruction3 | ^^^^^^^^^^^^^^^^^^^^ error: invalid instruction mnemonic 'invalid_instruction4' - --> $DIR/srcloc.rs:114:13 + --> $DIR/srcloc.rs:113:13 | LL | concat!( | ^ diff --git a/src/test/ui/asm/x86_64/sym.rs b/src/test/ui/asm/x86_64/sym.rs index 634ef010e6fea..0496ff6dd2458 100644 --- a/src/test/ui/asm/x86_64/sym.rs +++ b/src/test/ui/asm/x86_64/sym.rs @@ -1,4 +1,4 @@ -// min-llvm-version: 10.0.1 +// min-llvm-version: 12.0.0 // only-x86_64 // only-linux // run-pass diff --git a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs index 9697146d5c3d8..d5c67af2b4146 100644 --- a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs +++ b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs @@ -1,7 +1,6 @@ // build-fail // compile-flags: --target thumbv8m.main-none-eabi --crate-type lib // needs-llvm-components: arm -// min-llvm-version: 11.0 #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] #[lang="sized"] diff --git a/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs b/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs index 74321fdfdde90..ca133a5e167d9 100644 --- a/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs +++ b/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs @@ -1,7 +1,7 @@ // build-fail // compile-flags: --target thumbv8m.main-none-eabi --crate-type lib // needs-llvm-components: arm -// min-llvm-version: 11.0 +// min-llvm-version: 12.0 #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/src/test/ui/issues/issue-69225-SCEVAddExpr-wrap-flag.rs b/src/test/ui/issues/issue-69225-SCEVAddExpr-wrap-flag.rs index e04dec24e445e..6e030f1cc4875 100644 --- a/src/test/ui/issues/issue-69225-SCEVAddExpr-wrap-flag.rs +++ b/src/test/ui/issues/issue-69225-SCEVAddExpr-wrap-flag.rs @@ -1,6 +1,5 @@ // run-fail // compile-flags: -C opt-level=3 -// min-llvm-version: 11.0 // error-pattern: index out of bounds: the len is 0 but the index is 16777216 // ignore-wasm no panic or subprocess support // ignore-emscripten no panic or subprocess support From 8b0e7095a0814edee204cbf8850a3f25e0ca2b1e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 19 Oct 2021 14:49:39 -0700 Subject: [PATCH 2/4] llvm-dwp-11 fails on absolute paths --- src/test/run-make-fulldeps/split-debuginfo/Makefile | 5 +++++ src/test/run-make-fulldeps/split-dwarf/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/test/run-make-fulldeps/split-debuginfo/Makefile b/src/test/run-make-fulldeps/split-debuginfo/Makefile index e8e62efe01c14..d7412fcd38385 100644 --- a/src/test/run-make-fulldeps/split-debuginfo/Makefile +++ b/src/test/run-make-fulldeps/split-debuginfo/Makefile @@ -1,5 +1,10 @@ -include ../tools.mk +# Needs commit 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322, +# "[llvm-dwp] Join dwo paths correctly when DWOPath is absolute", +# backported to 12.x in b1106a5b3bc94f6da11682007d101823f81bad30. +# min-llvm-version: 12.0 + all: off packed unpacked ifeq ($(UNAME),Darwin) diff --git a/src/test/run-make-fulldeps/split-dwarf/Makefile b/src/test/run-make-fulldeps/split-dwarf/Makefile index ef61ff0450157..7c819e8b14451 100644 --- a/src/test/run-make-fulldeps/split-dwarf/Makefile +++ b/src/test/run-make-fulldeps/split-dwarf/Makefile @@ -2,6 +2,11 @@ # only-linux +# Needs commit 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322, +# "[llvm-dwp] Join dwo paths correctly when DWOPath is absolute", +# backported to 12.x in b1106a5b3bc94f6da11682007d101823f81bad30. +# min-llvm-version: 12.0 + all: $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g rm $(TMPDIR)/foo.dwp From e9f545b9a952f193dbe15730bcbe47784b6e7cde Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 22 Oct 2021 10:50:07 -0700 Subject: [PATCH 3/4] Update the minimum external LLVM to 12 --- .github/workflows/ci.yml | 4 +- .../rustc_llvm/llvm-wrapper/PassWrapper.cpp | 76 +------------------ .../rustc_llvm/llvm-wrapper/RustWrapper.cpp | 24 ------ src/bootstrap/native.rs | 4 +- .../Dockerfile | 6 +- src/ci/github-actions/ci.yml | 4 +- .../assembly/asm/aarch64-outline-atomics.rs | 1 - src/test/assembly/asm/powerpc-types.rs | 2 +- src/test/assembly/asm/riscv-types.rs | 1 - src/test/assembly/asm/wasm-types.rs | 1 - src/test/assembly/static-relocation-model.rs | 1 - src/test/codegen/function-arguments.rs | 2 - src/test/codegen/issue-73031.rs | 1 - src/test/codegen/issue-75525-bounds-checks.rs | 1 - src/test/codegen/issue-75546.rs | 1 - src/test/codegen/issue-77812.rs | 1 - .../codegen/non-terminate/infinite-loop-1.rs | 1 - .../codegen/non-terminate/infinite-loop-2.rs | 1 - .../non-terminate/infinite-recursion.rs | 1 - .../non-terminate/nonempty-infinite-loop.rs | 1 - .../codegen/repr-transparent-aggregates-1.rs | 1 - .../codegen/repr-transparent-aggregates-2.rs | 1 - .../codegen/repr-transparent-aggregates-3.rs | 1 - src/test/codegen/wasm_casts_trapping.rs | 1 - .../split-debuginfo/Makefile | 5 -- .../run-make-fulldeps/split-dwarf/Makefile | 5 -- src/test/ui/asm/x86_64/sym.rs | 2 +- .../cmse-nonsecure-entry/params-on-stack.rs | 1 - ...function-pointer-comparison-issue-54685.rs | 1 - 29 files changed, 13 insertions(+), 139 deletions(-) rename src/ci/docker/host-x86_64/{x86_64-gnu-llvm-11 => x86_64-gnu-llvm-12}/Dockerfile (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ce1d4b2d4eca..5278de2727e7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: mingw-check os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-11 + - name: x86_64-gnu-llvm-12 os: ubuntu-latest-xl env: {} - name: x86_64-gnu-tools @@ -274,7 +274,7 @@ jobs: - name: x86_64-gnu-distcheck os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-11 + - name: x86_64-gnu-llvm-12 env: RUST_BACKTRACE: 1 os: ubuntu-latest-xl diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index dcf81dd7eb5b7..d6dc54c8d0ad6 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -681,7 +681,6 @@ void LLVMSelfProfileInitializeCallbacks( PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler, LLVMRustSelfProfileBeforePassCallback BeforePassCallback, LLVMRustSelfProfileAfterPassCallback AfterPassCallback) { -#if LLVM_VERSION_GE(12, 0) PIC.registerBeforeNonSkippedPassCallback([LlvmSelfProfiler, BeforePassCallback]( StringRef Pass, llvm::Any Ir) { std::string PassName = Pass.str(); @@ -699,25 +698,6 @@ void LLVMSelfProfileInitializeCallbacks( [LlvmSelfProfiler, AfterPassCallback](StringRef Pass, const PreservedAnalyses &Preserved) { AfterPassCallback(LlvmSelfProfiler); }); -#else - PIC.registerBeforePassCallback([LlvmSelfProfiler, BeforePassCallback]( - StringRef Pass, llvm::Any Ir) { - std::string PassName = Pass.str(); - std::string IrName = LLVMRustwrappedIrGetName(Ir); - BeforePassCallback(LlvmSelfProfiler, PassName.c_str(), IrName.c_str()); - return true; - }); - - PIC.registerAfterPassCallback( - [LlvmSelfProfiler, AfterPassCallback](StringRef Pass, llvm::Any Ir) { - AfterPassCallback(LlvmSelfProfiler); - }); - - PIC.registerAfterPassInvalidatedCallback( - [LlvmSelfProfiler, AfterPassCallback](StringRef Pass) { - AfterPassCallback(LlvmSelfProfiler); - }); -#endif PIC.registerBeforeAnalysisCallback([LlvmSelfProfiler, BeforePassCallback]( StringRef Pass, llvm::Any Ir) { @@ -778,22 +758,13 @@ LLVMRustOptimizeWithNewPassManager( PTO.LoopInterleaving = UnrollLoops; PTO.LoopVectorization = LoopVectorize; PTO.SLPVectorization = SLPVectorize; -#if LLVM_VERSION_GE(12, 0) PTO.MergeFunctions = MergeFunctions; -#else - // MergeFunctions is not supported by NewPM in older LLVM versions. - (void) MergeFunctions; -#endif // FIXME: We may want to expose this as an option. bool DebugPassManager = false; PassInstrumentationCallbacks PIC; -#if LLVM_VERSION_GE(12, 0) StandardInstrumentations SI(DebugPassManager); -#else - StandardInstrumentations SI; -#endif SI.registerCallbacks(PIC); if (LlvmSelfProfiler){ @@ -817,18 +788,14 @@ LLVMRustOptimizeWithNewPassManager( PGOOptions::NoCSAction, DebugInfoForProfiling); } -#if LLVM_VERSION_GE(12, 0) && !LLVM_VERSION_GE(13,0) - PassBuilder PB(DebugPassManager, TM, PTO, PGOOpt, &PIC); -#else - PassBuilder PB(TM, PTO, PGOOpt, &PIC); -#endif - #if LLVM_VERSION_GE(13, 0) + PassBuilder PB(TM, PTO, PGOOpt, &PIC); LoopAnalysisManager LAM; FunctionAnalysisManager FAM; CGSCCAnalysisManager CGAM; ModuleAnalysisManager MAM; #else + PassBuilder PB(DebugPassManager, TM, PTO, PGOOpt, &PIC); LoopAnalysisManager LAM(DebugPassManager); FunctionAnalysisManager FAM(DebugPassManager); CGSCCAnalysisManager CGAM(DebugPassManager); @@ -960,7 +927,6 @@ LLVMRustOptimizeWithNewPassManager( // At the same time, the LTO pipelines do support O0 and using them is required. bool IsLTO = OptStage == LLVMRustOptStage::ThinLTO || OptStage == LLVMRustOptStage::FatLTO; if (OptLevel == OptimizationLevel::O0 && !IsLTO) { -#if LLVM_VERSION_GE(12, 0) for (const auto &C : PipelineStartEPCallbacks) PB.registerPipelineStartEPCallback(C); for (const auto &C : OptimizerLastEPCallbacks) @@ -968,31 +934,9 @@ LLVMRustOptimizeWithNewPassManager( // Pass false as we manually schedule ThinLTOBufferPasses below. MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ false); -#else - for (const auto &C : PipelineStartEPCallbacks) - C(MPM, OptLevel); - - for (const auto &C : OptimizerLastEPCallbacks) - C(MPM, OptLevel); - - MPM.addPass(AlwaysInlinerPass(EmitLifetimeMarkers)); - - if (PGOOpt) { - PB.addPGOInstrPassesForO0( - MPM, DebugPassManager, PGOOpt->Action == PGOOptions::IRInstr, - /*IsCS=*/false, PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile); - } -#endif } else { -#if LLVM_VERSION_GE(12, 0) for (const auto &C : PipelineStartEPCallbacks) PB.registerPipelineStartEPCallback(C); -#else - for (const auto &C : PipelineStartEPCallbacks) - PB.registerPipelineStartEPCallback([C, OptLevel](ModulePassManager &MPM) { - C(MPM, OptLevel); - }); -#endif if (OptStage != LLVMRustOptStage::PreLinkThinLTO) { for (const auto &C : OptimizerLastEPCallbacks) PB.registerOptimizerLastEPCallback(C); @@ -1003,7 +947,6 @@ LLVMRustOptimizeWithNewPassManager( MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager); break; case LLVMRustOptStage::PreLinkThinLTO: -#if LLVM_VERSION_GE(12, 0) MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel); // The ThinLTOPreLink pipeline already includes ThinLTOBuffer passes. However, callback // passes may still run afterwards. This means we need to run the buffer passes again. @@ -1011,35 +954,20 @@ LLVMRustOptimizeWithNewPassManager( // before the RequiredLTOPreLinkPasses, in which case we can remove these hacks. if (OptimizerLastEPCallbacks.empty()) NeedThinLTOBufferPasses = false; -#else - MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager); -#endif for (const auto &C : OptimizerLastEPCallbacks) C(MPM, OptLevel); break; case LLVMRustOptStage::PreLinkFatLTO: -#if LLVM_VERSION_GE(12, 0) MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel); NeedThinLTOBufferPasses = false; -#else - MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel, DebugPassManager); -#endif break; case LLVMRustOptStage::ThinLTO: // FIXME: Does it make sense to pass the ModuleSummaryIndex? // It only seems to be needed for C++ specific optimizations. -#if LLVM_VERSION_GE(12, 0) MPM = PB.buildThinLTODefaultPipeline(OptLevel, nullptr); -#else - MPM = PB.buildThinLTODefaultPipeline(OptLevel, DebugPassManager, nullptr); -#endif break; case LLVMRustOptStage::FatLTO: -#if LLVM_VERSION_GE(12, 0) MPM = PB.buildLTODefaultPipeline(OptLevel, nullptr); -#else - MPM = PB.buildLTODefaultPipeline(OptLevel, DebugPassManager, nullptr); -#endif break; } } diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 3ce98b177ad58..e77d29bed7122 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -263,11 +263,7 @@ extern "C" void LLVMRustAddByValCallSiteAttr(LLVMValueRef Instr, unsigned Index, extern "C" void LLVMRustAddStructRetCallSiteAttr(LLVMValueRef Instr, unsigned Index, LLVMTypeRef Ty) { CallBase *Call = unwrap(Instr); -#if LLVM_VERSION_GE(12, 0) Attribute Attr = Attribute::getWithStructRetType(Call->getContext(), unwrap(Ty)); -#else - Attribute Attr = Attribute::get(Call->getContext(), Attribute::StructRet); -#endif AddAttribute(Call, Index, Attr); } @@ -311,11 +307,7 @@ extern "C" void LLVMRustAddByValAttr(LLVMValueRef Fn, unsigned Index, extern "C" void LLVMRustAddStructRetAttr(LLVMValueRef Fn, unsigned Index, LLVMTypeRef Ty) { Function *F = unwrap(Fn); -#if LLVM_VERSION_GE(12, 0) Attribute Attr = Attribute::getWithStructRetType(F->getContext(), unwrap(Ty)); -#else - Attribute Attr = Attribute::get(F->getContext(), Attribute::StructRet); -#endif AddAttribute(F, Index, Attr); } @@ -1024,17 +1016,11 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateDebugLocation(unsigned Line, unsigned Column, LLVMMetadataRef ScopeRef, LLVMMetadataRef InlinedAt) { -#if LLVM_VERSION_GE(12, 0) MDNode *Scope = unwrapDIPtr(ScopeRef); DILocation *Loc = DILocation::get( Scope->getContext(), Line, Column, Scope, unwrapDIPtr(InlinedAt)); return wrap(Loc); -#else - DebugLoc debug_loc = DebugLoc::get(Line, Column, unwrapDIPtr(ScopeRef), - unwrapDIPtr(InlinedAt)); - return wrap(debug_loc.getAsMDNode()); -#endif } extern "C" int64_t LLVMRustDIBuilderCreateOpDeref() { @@ -1249,10 +1235,8 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) { return LLVMScalableVectorTypeKind; case Type::BFloatTyID: return LLVMBFloatTypeKind; -#if LLVM_VERSION_GE(12, 0) case Type::X86_AMXTyID: return LLVMX86_AMXTypeKind; -#endif } report_fatal_error("Unhandled TypeID."); } @@ -1710,23 +1694,15 @@ LLVMRustBuildVectorReduceMax(LLVMBuilderRef B, LLVMValueRef Src, bool IsSigned) } extern "C" LLVMValueRef LLVMRustBuildVectorReduceFMin(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) { -#if LLVM_VERSION_GE(12, 0) Instruction *I = unwrap(B)->CreateFPMinReduce(unwrap(Src)); I->setHasNoNaNs(NoNaN); return wrap(I); -#else - return wrap(unwrap(B)->CreateFPMinReduce(unwrap(Src), NoNaN)); -#endif } extern "C" LLVMValueRef LLVMRustBuildVectorReduceFMax(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) { -#if LLVM_VERSION_GE(12, 0) Instruction *I = unwrap(B)->CreateFPMaxReduce(unwrap(Src)); I->setHasNoNaNs(NoNaN); return wrap(I); -#else - return wrap(unwrap(B)->CreateFPMaxReduce(unwrap(Src), NoNaN)); -#endif } extern "C" LLVMValueRef diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index c4125ba0be0c1..37578e30f6d0f 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -378,11 +378,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) { let version = output(cmd.arg("--version")); let mut parts = version.split('.').take(2).filter_map(|s| s.parse::().ok()); if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) { - if major >= 11 { + if major >= 12 { return; } } - panic!("\n\nbad LLVM version: {}, need >=11.0\n\n", version) + panic!("\n\nbad LLVM version: {}, need >=12.0\n\n", version) } fn configure_cmake( diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-12/Dockerfile similarity index 96% rename from src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-llvm-12/Dockerfile index 45b555146cfb2..df1fbc29cf5e6 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-12/Dockerfile @@ -14,8 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ sudo \ gdb \ - llvm-11-tools \ - llvm-11-dev \ + llvm-12-tools \ + llvm-12-dev \ libedit-dev \ libssl-dev \ pkg-config \ @@ -29,7 +29,7 @@ RUN sh /scripts/sccache.sh # using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-11 \ + --llvm-root=/usr/lib/llvm-12 \ --enable-llvm-link-shared \ --set rust.thin-lto-import-instr-limit=10 diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 904e563787044..c51c0892fe679 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -284,7 +284,7 @@ jobs: - name: mingw-check <<: *job-linux-xl - - name: x86_64-gnu-llvm-11 + - name: x86_64-gnu-llvm-12 <<: *job-linux-xl - name: x86_64-gnu-tools @@ -431,7 +431,7 @@ jobs: - name: x86_64-gnu-distcheck <<: *job-linux-xl - - name: x86_64-gnu-llvm-11 + - name: x86_64-gnu-llvm-12 env: RUST_BACKTRACE: 1 <<: *job-linux-xl diff --git a/src/test/assembly/asm/aarch64-outline-atomics.rs b/src/test/assembly/asm/aarch64-outline-atomics.rs index 42cef9bb67911..c2ec4e911b9d1 100644 --- a/src/test/assembly/asm/aarch64-outline-atomics.rs +++ b/src/test/assembly/asm/aarch64-outline-atomics.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // assembly-output: emit-asm // compile-flags: -O // compile-flags: --target aarch64-unknown-linux-gnu diff --git a/src/test/assembly/asm/powerpc-types.rs b/src/test/assembly/asm/powerpc-types.rs index e2904cd3f87f6..342998245315e 100644 --- a/src/test/assembly/asm/powerpc-types.rs +++ b/src/test/assembly/asm/powerpc-types.rs @@ -1,4 +1,4 @@ -// min-llvm-version: 12.0.0 +// min-llvm-version: 12.0.1 // revisions: powerpc powerpc64 // assembly-output: emit-asm //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu diff --git a/src/test/assembly/asm/riscv-types.rs b/src/test/assembly/asm/riscv-types.rs index 0fe371c08397d..c510689b42bff 100644 --- a/src/test/assembly/asm/riscv-types.rs +++ b/src/test/assembly/asm/riscv-types.rs @@ -5,7 +5,6 @@ //[riscv32] compile-flags: --target riscv32imac-unknown-none-elf //[riscv32] needs-llvm-components: riscv // compile-flags: -C target-feature=+d -// min-system-llvm-version: 12.0 #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/src/test/assembly/asm/wasm-types.rs b/src/test/assembly/asm/wasm-types.rs index 1a356e3e5f16e..4b2e83e69b106 100644 --- a/src/test/assembly/asm/wasm-types.rs +++ b/src/test/assembly/asm/wasm-types.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0.0 // assembly-output: emit-asm // compile-flags: --target wasm32-unknown-unknown // compile-flags: --crate-type cdylib diff --git a/src/test/assembly/static-relocation-model.rs b/src/test/assembly/static-relocation-model.rs index b331d45668ab3..6c41e0b78f137 100644 --- a/src/test/assembly/static-relocation-model.rs +++ b/src/test/assembly/static-relocation-model.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0.0 // revisions: x64 A64 ppc64le // assembly-output: emit-asm // [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=static diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index f936f90960346..3e10e227e55fe 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -1,6 +1,4 @@ // compile-flags: -O -C no-prepopulate-passes -// -// min-system-llvm-version: 12.0 #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/src/test/codegen/issue-73031.rs b/src/test/codegen/issue-73031.rs index 6ba4d707f42b1..a09c4bcfbeac5 100644 --- a/src/test/codegen/issue-73031.rs +++ b/src/test/codegen/issue-73031.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0.0 // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/issue-75525-bounds-checks.rs b/src/test/codegen/issue-75525-bounds-checks.rs index a03c63c1d0948..2d363d8f73be9 100644 --- a/src/test/codegen/issue-75525-bounds-checks.rs +++ b/src/test/codegen/issue-75525-bounds-checks.rs @@ -1,6 +1,5 @@ // Regression test for #75525, verifies that no bounds checks are generated. -// min-llvm-version: 12.0.0 // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/issue-75546.rs b/src/test/codegen/issue-75546.rs index 49e4d4c7ec56d..470a9e0409605 100644 --- a/src/test/codegen/issue-75546.rs +++ b/src/test/codegen/issue-75546.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0.0 // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/issue-77812.rs b/src/test/codegen/issue-77812.rs index 95042579adb6b..4cc82414546b2 100644 --- a/src/test/codegen/issue-77812.rs +++ b/src/test/codegen/issue-77812.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0.0 // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/non-terminate/infinite-loop-1.rs b/src/test/codegen/non-terminate/infinite-loop-1.rs index 8f9a53d19d43a..fa9c66b47c0a4 100644 --- a/src/test/codegen/non-terminate/infinite-loop-1.rs +++ b/src/test/codegen/non-terminate/infinite-loop-1.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/src/test/codegen/non-terminate/infinite-loop-2.rs b/src/test/codegen/non-terminate/infinite-loop-2.rs index a4c76de1e3b8a..81d62ab33d778 100644 --- a/src/test/codegen/non-terminate/infinite-loop-2.rs +++ b/src/test/codegen/non-terminate/infinite-loop-2.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/src/test/codegen/non-terminate/infinite-recursion.rs b/src/test/codegen/non-terminate/infinite-recursion.rs index ccb22afbc7ae0..6d1f2d4bf8f4a 100644 --- a/src/test/codegen/non-terminate/infinite-recursion.rs +++ b/src/test/codegen/non-terminate/infinite-recursion.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/src/test/codegen/non-terminate/nonempty-infinite-loop.rs b/src/test/codegen/non-terminate/nonempty-infinite-loop.rs index 896b7e8721cb7..5e25e04fc24ac 100644 --- a/src/test/codegen/non-terminate/nonempty-infinite-loop.rs +++ b/src/test/codegen/non-terminate/nonempty-infinite-loop.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs index 3017adb443252..a61dad218cd85 100644 --- a/src/test/codegen/repr-transparent-aggregates-1.rs +++ b/src/test/codegen/repr-transparent-aggregates-1.rs @@ -1,7 +1,6 @@ // compile-flags: -C no-prepopulate-passes // -// min-system-llvm-version: 12.0 // ignore-arm // ignore-aarch64 // ignore-mips diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs index 429d760b4aa04..b68e8e9ebe9b4 100644 --- a/src/test/codegen/repr-transparent-aggregates-2.rs +++ b/src/test/codegen/repr-transparent-aggregates-2.rs @@ -1,7 +1,6 @@ // compile-flags: -C no-prepopulate-passes // -// min-system-llvm-version: 12.0 // ignore-aarch64 // ignore-emscripten // ignore-mips64 diff --git a/src/test/codegen/repr-transparent-aggregates-3.rs b/src/test/codegen/repr-transparent-aggregates-3.rs index 21176ac0e7a23..0db17e6b13a80 100644 --- a/src/test/codegen/repr-transparent-aggregates-3.rs +++ b/src/test/codegen/repr-transparent-aggregates-3.rs @@ -1,7 +1,6 @@ // compile-flags: -C no-prepopulate-passes // -// min-system-llvm-version: 12.0 // only-mips64 // See repr-transparent.rs diff --git a/src/test/codegen/wasm_casts_trapping.rs b/src/test/codegen/wasm_casts_trapping.rs index baf130a879179..eb06c4975bb7c 100644 --- a/src/test/codegen/wasm_casts_trapping.rs +++ b/src/test/codegen/wasm_casts_trapping.rs @@ -1,6 +1,5 @@ // only-wasm32 // compile-flags: -C target-feature=-nontrapping-fptoint -// min-llvm-version: 12.0 #![crate_type = "lib"] // CHECK-LABEL: @cast_f64_i64 diff --git a/src/test/run-make-fulldeps/split-debuginfo/Makefile b/src/test/run-make-fulldeps/split-debuginfo/Makefile index d7412fcd38385..e8e62efe01c14 100644 --- a/src/test/run-make-fulldeps/split-debuginfo/Makefile +++ b/src/test/run-make-fulldeps/split-debuginfo/Makefile @@ -1,10 +1,5 @@ -include ../tools.mk -# Needs commit 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322, -# "[llvm-dwp] Join dwo paths correctly when DWOPath is absolute", -# backported to 12.x in b1106a5b3bc94f6da11682007d101823f81bad30. -# min-llvm-version: 12.0 - all: off packed unpacked ifeq ($(UNAME),Darwin) diff --git a/src/test/run-make-fulldeps/split-dwarf/Makefile b/src/test/run-make-fulldeps/split-dwarf/Makefile index 7c819e8b14451..ef61ff0450157 100644 --- a/src/test/run-make-fulldeps/split-dwarf/Makefile +++ b/src/test/run-make-fulldeps/split-dwarf/Makefile @@ -2,11 +2,6 @@ # only-linux -# Needs commit 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322, -# "[llvm-dwp] Join dwo paths correctly when DWOPath is absolute", -# backported to 12.x in b1106a5b3bc94f6da11682007d101823f81bad30. -# min-llvm-version: 12.0 - all: $(RUSTC) -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 foo.rs -g rm $(TMPDIR)/foo.dwp diff --git a/src/test/ui/asm/x86_64/sym.rs b/src/test/ui/asm/x86_64/sym.rs index 0496ff6dd2458..188d03e298e01 100644 --- a/src/test/ui/asm/x86_64/sym.rs +++ b/src/test/ui/asm/x86_64/sym.rs @@ -1,4 +1,4 @@ -// min-llvm-version: 12.0.0 +// min-llvm-version: 12.0.1 // only-x86_64 // only-linux // run-pass diff --git a/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs b/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs index ca133a5e167d9..9a1b0a38d5eac 100644 --- a/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs +++ b/src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs @@ -1,7 +1,6 @@ // build-fail // compile-flags: --target thumbv8m.main-none-eabi --crate-type lib // needs-llvm-components: arm -// min-llvm-version: 12.0 #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/src/test/ui/function-pointer/function-pointer-comparison-issue-54685.rs b/src/test/ui/function-pointer/function-pointer-comparison-issue-54685.rs index a036d10e63902..855749c14b9c3 100644 --- a/src/test/ui/function-pointer/function-pointer-comparison-issue-54685.rs +++ b/src/test/ui/function-pointer/function-pointer-comparison-issue-54685.rs @@ -1,4 +1,3 @@ -// min-llvm-version: 12.0 // compile-flags: -C opt-level=3 // run-pass From 8b1504cfb73894040f8096623e6f9d4559c9eb7f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 23 Oct 2021 10:16:09 -0700 Subject: [PATCH 4/4] bless the line changes in ui/asm/aarch64/srcloc.rs --- src/test/ui/asm/aarch64/srcloc.stderr | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/test/ui/asm/aarch64/srcloc.stderr b/src/test/ui/asm/aarch64/srcloc.stderr index 96dab1bce0b75..f03fbf28d3184 100644 --- a/src/test/ui/asm/aarch64/srcloc.stderr +++ b/src/test/ui/asm/aarch64/srcloc.stderr @@ -1,5 +1,5 @@ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:11:15 + --> $DIR/srcloc.rs:10:15 | LL | asm!("invalid_instruction"); | ^ @@ -11,7 +11,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:15:13 + --> $DIR/srcloc.rs:14:13 | LL | invalid_instruction | ^ @@ -23,7 +23,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:20:13 + --> $DIR/srcloc.rs:19:13 | LL | invalid_instruction | ^ @@ -35,7 +35,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:26:13 + --> $DIR/srcloc.rs:25:13 | LL | invalid_instruction | ^ @@ -47,7 +47,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:33:13 + --> $DIR/srcloc.rs:32:13 | LL | invalid_instruction | ^ @@ -59,7 +59,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:38:14 + --> $DIR/srcloc.rs:37:14 | LL | asm!(concat!("invalid", "_", "instruction")); | ^ @@ -71,7 +71,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:42:14 + --> $DIR/srcloc.rs:41:14 | LL | "invalid_instruction", | ^ @@ -83,7 +83,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:48:14 + --> $DIR/srcloc.rs:47:14 | LL | "invalid_instruction", | ^ @@ -95,7 +95,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:55:14 + --> $DIR/srcloc.rs:54:14 | LL | "invalid_instruction", | ^ @@ -107,7 +107,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:62:13 + --> $DIR/srcloc.rs:61:13 | LL | concat!("invalid", "_", "instruction"), | ^ @@ -119,7 +119,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:69:13 + --> $DIR/srcloc.rs:68:13 | LL | concat!("invalid", "_", "instruction"), | ^ @@ -131,7 +131,7 @@ LL | invalid_instruction | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:76:14 + --> $DIR/srcloc.rs:75:14 | LL | "invalid_instruction1", | ^ @@ -143,7 +143,7 @@ LL | invalid_instruction1 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:77:14 + --> $DIR/srcloc.rs:76:14 | LL | "invalid_instruction2", | ^ @@ -155,7 +155,7 @@ LL | invalid_instruction2 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:83:13 + --> $DIR/srcloc.rs:82:13 | LL | concat!( | ^ @@ -167,7 +167,7 @@ LL | invalid_instruction1 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:83:13 + --> $DIR/srcloc.rs:82:13 | LL | concat!( | ^ @@ -179,7 +179,7 @@ LL | invalid_instruction2 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:92:13 + --> $DIR/srcloc.rs:91:13 | LL | concat!( | ^ @@ -191,7 +191,7 @@ LL | invalid_instruction1 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:92:13 + --> $DIR/srcloc.rs:91:13 | LL | concat!( | ^ @@ -203,7 +203,7 @@ LL | invalid_instruction2 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:96:13 + --> $DIR/srcloc.rs:95:13 | LL | concat!( | ^ @@ -215,7 +215,7 @@ LL | invalid_instruction3 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:96:13 + --> $DIR/srcloc.rs:95:13 | LL | concat!( | ^ @@ -227,7 +227,7 @@ LL | invalid_instruction4 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:107:13 + --> $DIR/srcloc.rs:106:13 | LL | concat!( | ^ @@ -239,7 +239,7 @@ LL | invalid_instruction1 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:107:13 + --> $DIR/srcloc.rs:106:13 | LL | concat!( | ^ @@ -251,7 +251,7 @@ LL | invalid_instruction2 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:111:13 + --> $DIR/srcloc.rs:110:13 | LL | concat!( | ^ @@ -263,7 +263,7 @@ LL | invalid_instruction3 | ^ error: unrecognized instruction mnemonic - --> $DIR/srcloc.rs:111:13 + --> $DIR/srcloc.rs:110:13 | LL | concat!( | ^