summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml4
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp76
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp24
-rw-r--r--src/bootstrap/native.rs4
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-12/Dockerfile (renamed from src/ci/docker/host-x86_64/x86_64-gnu-llvm-11/Dockerfile)6
-rw-r--r--src/ci/github-actions/ci.yml4
-rw-r--r--src/test/assembly/asm/aarch64-outline-atomics.rs1
-rw-r--r--src/test/assembly/asm/powerpc-types.rs2
-rw-r--r--src/test/assembly/asm/riscv-types.rs1
-rw-r--r--src/test/assembly/asm/wasm-types.rs1
-rw-r--r--src/test/assembly/static-relocation-model.rs1
-rw-r--r--src/test/codegen/function-arguments.rs2
-rw-r--r--src/test/codegen/issue-73031.rs1
-rw-r--r--src/test/codegen/issue-75525-bounds-checks.rs1
-rw-r--r--src/test/codegen/issue-75546.rs1
-rw-r--r--src/test/codegen/issue-77812.rs1
-rw-r--r--src/test/codegen/non-terminate/infinite-loop-1.rs1
-rw-r--r--src/test/codegen/non-terminate/infinite-loop-2.rs1
-rw-r--r--src/test/codegen/non-terminate/infinite-recursion.rs1
-rw-r--r--src/test/codegen/non-terminate/nonempty-infinite-loop.rs1
-rw-r--r--src/test/codegen/repr-transparent-aggregates-1.rs1
-rw-r--r--src/test/codegen/repr-transparent-aggregates-2.rs1
-rw-r--r--src/test/codegen/repr-transparent-aggregates-3.rs1
-rw-r--r--src/test/codegen/wasm_casts_trapping.rs1
-rw-r--r--src/test/run-make-fulldeps/split-debuginfo/Makefile5
-rw-r--r--src/test/run-make-fulldeps/split-dwarf/Makefile5
-rw-r--r--src/test/ui/asm/x86_64/sym.rs2
-rw-r--r--src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs1
-rw-r--r--src/test/ui/function-pointer/function-pointer-comparison-issue-54685.rs1
29 files changed, 13 insertions, 139 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5ce1d4b2d4e..5278de2727e 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 dcf81dd7eb5..d6dc54c8d0a 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 3ce98b177ad..e77d29bed71 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<CallBase>(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<Function>(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<MDNode>(ScopeRef);
DILocation *Loc = DILocation::get(
Scope->getContext(), Line, Column, Scope,
unwrapDIPtr<MDNode>(InlinedAt));
return wrap(Loc);
-#else
- DebugLoc debug_loc = DebugLoc::get(Line, Column, unwrapDIPtr<MDNode>(ScopeRef),
- unwrapDIPtr<MDNode>(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 c4125ba0be0..37578e30f6d 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::<u32>().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
index 45b555146cf..df1fbc29cf5 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 904e5637870..c51c0892fe6 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 42cef9bb679..c2ec4e911b9 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 e2904cd3f87..34299824531 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 0fe371c0839..c510689b42b 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 1a356e3e5f1..4b2e83e69b1 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 b331d45668a..6c41e0b78f1 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 f936f909603..3e10e227e55 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 6ba4d707f42..a09c4bcfbea 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 a03c63c1d09..2d363d8f73b 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 49e4d4c7ec5..470a9e04096 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 95042579adb..4cc82414546 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 8f9a53d19d4..fa9c66b47c0 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 a4c76de1e3b..81d62ab33d7 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 ccb22afbc7a..6d1f2d4bf8f 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 896b7e8721c..5e25e04fc24 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 3017adb4432..a61dad218cd 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 429d760b4aa..b68e8e9ebe9 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 21176ac0e7a..0db17e6b13a 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 baf130a8791..eb06c4975bb 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 d7412fcd383..e8e62efe01c 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 7c819e8b144..ef61ff04501 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 0496ff6dd24..188d03e298e 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 ca133a5e167..9a1b0a38d5e 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 a036d10e639..855749c14b9 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