about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2020-04-14 12:10:58 -0700
committerJosh Stone <jistone@redhat.com>2020-04-14 12:44:41 -0700
commit8506bb006040cf8e8cb004202706c81e62ddacee (patch)
tree2e374e4dcad22b16ecf717fa309e3d4813d5a6fe /src
parentba72b15666b2491415aec703a02c2364fe5e2790 (diff)
downloadrust-8506bb006040cf8e8cb004202706c81e62ddacee.tar.gz
rust-8506bb006040cf8e8cb004202706c81e62ddacee.zip
Update the minimum external LLVM to 8
LLVM 8 was released on March 20, 2019, over a year ago.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/native.rs4
-rw-r--r--src/ci/azure-pipelines/auto.yml2
-rw-r--r--src/ci/azure-pipelines/pr.yml2
-rw-r--r--src/ci/docker/x86_64-gnu-llvm-8/Dockerfile (renamed from src/ci/docker/x86_64-gnu-llvm-7/Dockerfile)4
-rw-r--r--src/ci/github-actions/ci.yml8
-rw-r--r--src/librustc_codegen_llvm/attributes.rs21
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs18
-rw-r--r--src/librustc_codegen_llvm/intrinsic.rs51
-rw-r--r--src/librustc_codegen_llvm/llvm_util.rs20
-rw-r--r--src/rustllvm/PassWrapper.cpp22
-rw-r--r--src/rustllvm/RustWrapper.cpp25
-rw-r--r--src/test/codegen/enum-debug-clike.rs13
-rw-r--r--src/test/codegen/enum-debug-niche-2.rs8
-rw-r--r--src/test/codegen/enum-debug-niche.rs8
-rw-r--r--src/test/codegen/enum-debug-tagged.rs8
-rw-r--r--src/test/codegen/force-frame-pointers.rs1
-rw-r--r--src/test/codegen/instrument-mcount.rs1
-rw-r--r--src/test/debuginfo/borrowed-enum.rs3
-rw-r--r--src/test/debuginfo/enum-thinlto.rs3
-rw-r--r--src/test/debuginfo/generator-objects.rs3
-rw-r--r--src/test/debuginfo/generic-enum-with-different-disr-sizes.rs3
-rw-r--r--src/test/debuginfo/generic-struct-style-enum.rs3
-rw-r--r--src/test/debuginfo/generic-tuple-style-enum.rs4
-rw-r--r--src/test/debuginfo/issue-57822.rs3
-rw-r--r--src/test/debuginfo/recursive-struct.rs3
-rw-r--r--src/test/debuginfo/struct-style-enum.rs4
-rw-r--r--src/test/debuginfo/tuple-style-enum.rs4
-rw-r--r--src/test/debuginfo/unique-enum.rs4
-rw-r--r--src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs1
29 files changed, 63 insertions, 191 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 1e380a20629..0c87695ff7c 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -289,11 +289,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 >= 7 {
+        if major >= 8 {
             return;
         }
     }
-    panic!("\n\nbad LLVM version: {}, need >=7.0\n\n", version)
+    panic!("\n\nbad LLVM version: {}, need >=8.0\n\n", version)
 }
 
 fn configure_cmake(
diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml
index 56fe3864204..46d3cf7a38c 100644
--- a/src/ci/azure-pipelines/auto.yml
+++ b/src/ci/azure-pipelines/auto.yml
@@ -29,7 +29,7 @@ jobs:
   - template: steps/run.yml
   strategy:
     matrix:
-      x86_64-gnu-llvm-7:
+      x86_64-gnu-llvm-8:
         RUST_BACKTRACE: 1
       dist-x86_64-linux: {}
       dist-x86_64-linux-alt:
diff --git a/src/ci/azure-pipelines/pr.yml b/src/ci/azure-pipelines/pr.yml
index 37c1779b799..1fc8d187242 100644
--- a/src/ci/azure-pipelines/pr.yml
+++ b/src/ci/azure-pipelines/pr.yml
@@ -29,7 +29,7 @@ jobs:
     - template: steps/run.yml
   strategy:
     matrix:
-      x86_64-gnu-llvm-7: {}
+      x86_64-gnu-llvm-8: {}
       mingw-check: {}
       x86_64-gnu-tools:
         CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
diff --git a/src/ci/docker/x86_64-gnu-llvm-7/Dockerfile b/src/ci/docker/x86_64-gnu-llvm-8/Dockerfile
index f70c3de2ece..58fdc6f2623 100644
--- a/src/ci/docker/x86_64-gnu-llvm-7/Dockerfile
+++ b/src/ci/docker/x86_64-gnu-llvm-8/Dockerfile
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
   cmake \
   sudo \
   gdb \
-  llvm-7-tools \
+  llvm-8-tools \
   libedit-dev \
   libssl-dev \
   pkg-config \
@@ -26,7 +26,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-7 \
+      --llvm-root=/usr/lib/llvm-8 \
       --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 813c35cb9d5..df1467ea73a 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -259,13 +259,13 @@ jobs:
       matrix:
         name:
           - mingw-check
-          - x86_64-gnu-llvm-7
+          - x86_64-gnu-llvm-8
           - x86_64-gnu-tools
         include:
           - name: mingw-check
             <<: *job-linux-xl
 
-          - name: x86_64-gnu-llvm-7
+          - name: x86_64-gnu-llvm-8
             <<: *job-linux-xl
 
           - name: x86_64-gnu-tools
@@ -349,7 +349,7 @@ jobs:
           - x86_64-gnu-debug
           - x86_64-gnu-distcheck
           - x86_64-gnu-full-bootstrap
-          - x86_64-gnu-llvm-7
+          - x86_64-gnu-llvm-8
           - x86_64-gnu-nopt
           - x86_64-gnu-tools
           - x86_64-mingw-1
@@ -471,7 +471,7 @@ jobs:
           - name: x86_64-gnu-full-bootstrap
             <<: *job-linux-xl
 
-          - name: x86_64-gnu-llvm-7
+          - name: x86_64-gnu-llvm-8
             env:
               RUST_BACKTRACE: 1
             <<: *job-linux-xl
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs
index 784a3a87e98..004de8d8ca9 100644
--- a/src/librustc_codegen_llvm/attributes.rs
+++ b/src/librustc_codegen_llvm/attributes.rs
@@ -82,21 +82,12 @@ fn naked(val: &'ll Value, is_naked: bool) {
 
 pub fn set_frame_pointer_elimination(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
     if cx.sess().must_not_eliminate_frame_pointers() {
-        if llvm_util::get_major_version() >= 8 {
-            llvm::AddFunctionAttrStringValue(
-                llfn,
-                llvm::AttributePlace::Function,
-                const_cstr!("frame-pointer"),
-                const_cstr!("all"),
-            );
-        } else {
-            llvm::AddFunctionAttrStringValue(
-                llfn,
-                llvm::AttributePlace::Function,
-                const_cstr!("no-frame-pointer-elim"),
-                const_cstr!("true"),
-            );
-        }
+        llvm::AddFunctionAttrStringValue(
+            llfn,
+            llvm::AttributePlace::Function,
+            const_cstr!("frame-pointer"),
+            const_cstr!("all"),
+        );
     }
 }
 
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index 82cd8589327..03bba7657bb 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -16,7 +16,6 @@ use crate::llvm::debuginfo::{
     DIArray, DICompositeType, DIDescriptor, DIFile, DIFlags, DILexicalBlock, DIScope, DIType,
     DebugEmissionKind,
 };
-use crate::llvm_util;
 use crate::value::Value;
 
 use log::debug;
@@ -1289,22 +1288,11 @@ fn prepare_union_metadata(
 // Enums
 //=-----------------------------------------------------------------------------
 
-/// DWARF variant support is only available starting in LLVM 8.
-/// Although the earlier enum debug info output did not work properly
-/// in all situations, it is better for the time being to continue to
-/// sometimes emit the old style rather than emit something completely
-/// useless when rust is compiled against LLVM 6 or older. LLVM 7
-/// contains an early version of the DWARF variant support, and will
-/// crash when handling the new debug info format. This function
-/// decides which representation will be emitted.
+/// DWARF variant support is only available starting in LLVM 8, but
+/// on MSVC we have to use the fallback mode, because LLVM doesn't
+/// lower variant parts to PDB.
 fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
-    // On MSVC we have to use the fallback mode, because LLVM doesn't
-    // lower variant parts to PDB.
     cx.sess().target.target.options.is_like_msvc
-        // LLVM version 7 did not release with an important bug fix;
-        // but the required patch is in the LLVM 8.  Rust LLVM reports
-        // 8 as well.
-        || llvm_util::get_major_version() < 8
 }
 
 // FIXME(eddyb) maybe precompute this? Right now it's computed once
diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs
index 63730c56f0e..86d10e91d6d 100644
--- a/src/librustc_codegen_llvm/intrinsic.rs
+++ b/src/librustc_codegen_llvm/intrinsic.rs
@@ -2,7 +2,6 @@ use crate::abi::{Abi, FnAbi, LlvmType, PassMode};
 use crate::builder::Builder;
 use crate::context::CodegenCx;
 use crate::llvm;
-use crate::llvm_util;
 use crate::type_::Type;
 use crate::type_of::LayoutLlvmExt;
 use crate::va_arg::emit_va_arg;
@@ -11,7 +10,7 @@ use crate::value::Value;
 use rustc_ast::ast;
 use rustc_codegen_ssa::base::{compare_simd_types, to_immediate, wants_msvc_seh};
 use rustc_codegen_ssa::common::span_invalid_monomorphization_error;
-use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
+use rustc_codegen_ssa::common::TypeKind;
 use rustc_codegen_ssa::glue;
 use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
 use rustc_codegen_ssa::mir::place::PlaceRef;
@@ -461,46 +460,14 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
                             let is_add = name == "saturating_add";
                             let lhs = args[0].immediate();
                             let rhs = args[1].immediate();
-                            if llvm_util::get_major_version() >= 8 {
-                                let llvm_name = &format!(
-                                    "llvm.{}{}.sat.i{}",
-                                    if signed { 's' } else { 'u' },
-                                    if is_add { "add" } else { "sub" },
-                                    width
-                                );
-                                let llfn = self.get_intrinsic(llvm_name);
-                                self.call(llfn, &[lhs, rhs], None)
-                            } else {
-                                let llvm_name = &format!(
-                                    "llvm.{}{}.with.overflow.i{}",
-                                    if signed { 's' } else { 'u' },
-                                    if is_add { "add" } else { "sub" },
-                                    width
-                                );
-                                let llfn = self.get_intrinsic(llvm_name);
-                                let pair = self.call(llfn, &[lhs, rhs], None);
-                                let val = self.extract_value(pair, 0);
-                                let overflow = self.extract_value(pair, 1);
-                                let llty = self.type_ix(width);
-
-                                let limit = if signed {
-                                    let limit_lo = self
-                                        .const_uint_big(llty, (i128::MIN >> (128 - width)) as u128);
-                                    let limit_hi = self
-                                        .const_uint_big(llty, (i128::MAX >> (128 - width)) as u128);
-                                    let neg = self.icmp(
-                                        IntPredicate::IntSLT,
-                                        val,
-                                        self.const_uint(llty, 0),
-                                    );
-                                    self.select(neg, limit_hi, limit_lo)
-                                } else if is_add {
-                                    self.const_uint_big(llty, u128::MAX >> (128 - width))
-                                } else {
-                                    self.const_uint(llty, 0)
-                                };
-                                self.select(overflow, limit, val)
-                            }
+                            let llvm_name = &format!(
+                                "llvm.{}{}.sat.i{}",
+                                if signed { 's' } else { 'u' },
+                                if is_add { "add" } else { "sub" },
+                                width
+                            );
+                            let llfn = self.get_intrinsic(llvm_name);
+                            self.call(llfn, &[lhs, rhs], None)
                         }
                         _ => bug!(),
                     },
diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs
index a56c8802f3c..6f16b0fb79c 100644
--- a/src/librustc_codegen_llvm/llvm_util.rs
+++ b/src/librustc_codegen_llvm/llvm_util.rs
@@ -83,17 +83,15 @@ unsafe fn configure_llvm(sess: &Session) {
         if !sess.opts.debugging_opts.no_generate_arange_section {
             add("-generate-arange-section", false);
         }
-        if get_major_version() >= 8 {
-            match sess
-                .opts
-                .debugging_opts
-                .merge_functions
-                .unwrap_or(sess.target.target.options.merge_functions)
-            {
-                MergeFunctions::Disabled | MergeFunctions::Trampolines => {}
-                MergeFunctions::Aliases => {
-                    add("-mergefunc-use-aliases", false);
-                }
+        match sess
+            .opts
+            .debugging_opts
+            .merge_functions
+            .unwrap_or(sess.target.target.options.merge_functions)
+        {
+            MergeFunctions::Disabled | MergeFunctions::Trampolines => {}
+            MergeFunctions::Aliases => {
+                add("-mergefunc-use-aliases", false);
             }
         }
 
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 9e8614e3b6d..b221c17b422 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -33,10 +33,8 @@
 #include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
 #include "llvm/Support/TimeProfiler.h"
 #endif
-#if LLVM_VERSION_GE(8, 0)
 #include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
 #include "llvm/Transforms/Instrumentation/MemorySanitizer.h"
-#endif
 #if LLVM_VERSION_GE(9, 0)
 #include "llvm/Transforms/Utils/CanonicalizeAliases.h"
 #endif
@@ -138,19 +136,13 @@ extern "C" LLVMPassRef LLVMRustCreateMemorySanitizerPass(int TrackOrigins, bool
 
   return wrap(createMemorySanitizerLegacyPassPass(
       MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel}));
-#elif LLVM_VERSION_GE(8, 0)
-  return wrap(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover));
 #else
-  return wrap(createMemorySanitizerPass(TrackOrigins, Recover));
+  return wrap(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover));
 #endif
 }
 
 extern "C" LLVMPassRef LLVMRustCreateThreadSanitizerPass() {
-#if LLVM_VERSION_GE(8, 0)
   return wrap(createThreadSanitizerLegacyPassPass());
-#else
-  return wrap(createThreadSanitizerPass());
-#endif
 }
 
 extern "C" LLVMRustPassKind LLVMRustPassKind(LLVMPassRef RustPass) {
@@ -1236,15 +1228,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
   auto deadIsPrevailing = [&](GlobalValue::GUID G) {
     return PrevailingType::Unknown;
   };
-#if LLVM_VERSION_GE(8, 0)
   // We don't have a complete picture in our use of ThinLTO, just our immediate
   // crate, so we need `ImportEnabled = false` to limit internalization.
   // Otherwise, we sometimes lose `static` values -- see #60184.
   computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
                                   deadIsPrevailing, /* ImportEnabled = */ false);
-#else
-  computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing);
-#endif
   ComputeCrossModuleImport(
     Ret->Index,
     Ret->ModuleToDefinedGVSummaries,
@@ -1277,10 +1265,8 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
 #if LLVM_VERSION_GE(9, 0)
   thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage,
                                   Ret->GUIDPreservedSymbols);
-#elif LLVM_VERSION_GE(8, 0)
-  thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
 #else
-  thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
+  thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
 #endif
 
   // Here we calculate an `ExportedGUIDs` set for use in the `isExported`
@@ -1346,11 +1332,7 @@ extern "C" bool
 LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
   Module &Mod = *unwrap(M);
   const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
-#if LLVM_VERSION_GE(8, 0)
   thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
-#else
-  thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
-#endif
   return true;
 }
 
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 21094b32520..28efc8bf5dd 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -586,7 +586,6 @@ inline LLVMRustDISPFlags virtuality(LLVMRustDISPFlags F) {
   return static_cast<LLVMRustDISPFlags>(static_cast<uint32_t>(F) & 0x3);
 }
 
-#if LLVM_VERSION_GE(8, 0)
 static DISubprogram::DISPFlags fromRust(LLVMRustDISPFlags SPFlags) {
   DISubprogram::DISPFlags Result = DISubprogram::DISPFlags::SPFlagZero;
 
@@ -619,7 +618,6 @@ static DISubprogram::DISPFlags fromRust(LLVMRustDISPFlags SPFlags) {
 
   return Result;
 }
-#endif
 
 enum class LLVMRustDebugEmissionKind {
   NoDebug,
@@ -734,7 +732,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFunction(
     LLVMMetadataRef Decl) {
   DITemplateParameterArray TParams =
       DITemplateParameterArray(unwrap<MDTuple>(TParam));
-#if LLVM_VERSION_GE(8, 0)
   DISubprogram::DISPFlags llvmSPFlags = fromRust(SPFlags);
   DINode::DIFlags llvmFlags = fromRust(Flags);
 #if LLVM_VERSION_LT(9, 0)
@@ -748,22 +745,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFunction(
       unwrapDI<DIFile>(File), LineNo,
       unwrapDI<DISubroutineType>(Ty), ScopeLine, llvmFlags,
       llvmSPFlags, TParams, unwrapDIPtr<DISubprogram>(Decl));
-#else
-  bool IsLocalToUnit = isSet(SPFlags & LLVMRustDISPFlags::SPFlagLocalToUnit);
-  bool IsDefinition = isSet(SPFlags & LLVMRustDISPFlags::SPFlagDefinition);
-  bool IsOptimized = isSet(SPFlags & LLVMRustDISPFlags::SPFlagOptimized);
-  DINode::DIFlags llvmFlags = fromRust(Flags);
-  if (isSet(SPFlags & LLVMRustDISPFlags::SPFlagMainSubprogram))
-    llvmFlags |= DINode::DIFlags::FlagMainSubprogram;
-  DISubprogram *Sub = Builder->createFunction(
-      unwrapDI<DIScope>(Scope),
-      StringRef(Name, NameLen),
-      StringRef(LinkageName, LinkageNameLen),
-      unwrapDI<DIFile>(File), LineNo,
-      unwrapDI<DISubroutineType>(Ty), IsLocalToUnit, IsDefinition,
-      ScopeLine, llvmFlags, IsOptimized, TParams,
-      unwrapDIPtr<DISubprogram>(Decl));
-#endif
   unwrap<Function>(Fn)->setSubprogram(Sub);
   return wrap(Sub);
 }
@@ -884,9 +865,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
       /* isDefined */ true,
 #endif
       InitExpr, unwrapDIPtr<MDNode>(Decl),
-#if LLVM_VERSION_GE(8, 0)
       /* templateParams */ nullptr,
-#endif
       AlignInBits);
 
   InitVal->setMetadata("dbg", VarExpr);
@@ -1107,11 +1086,7 @@ extern "C" void LLVMRustUnpackOptimizationDiagnostic(
   if (loc.isValid()) {
     *Line = loc.getLine();
     *Column = loc.getColumn();
-#if LLVM_VERSION_GE(8, 0)
     FilenameOS << loc.getAbsolutePath();
-#else
-    FilenameOS << loc.getFilename();
-#endif
   }
 
   RawRustStringOstream MessageOS(MessageOut);
diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs
index f268c8bcbcc..134443931e9 100644
--- a/src/test/codegen/enum-debug-clike.rs
+++ b/src/test/codegen/enum-debug-clike.rs
@@ -1,18 +1,13 @@
-// This test depends on a patch that was committed to upstream LLVM
-// before 7.0, then backported to the Rust LLVM fork.  It tests that
-// debug info for "c-like" enums is properly emitted.
+// This tests that debug info for "c-like" enums is properly emitted.
+// This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 // ignore-tidy-linelength
-// ignore-windows
-// min-system-llvm-version 8.0
+// ignore-msvc
 
 // compile-flags: -g -C no-prepopulate-passes
 
-// DIFlagFixedEnum was deprecated in 8.0, renamed to DIFlagEnumClass.
-// We match either for compatibility.
-
 // CHECK-LABEL: @main
-// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: {{(DIFlagEnumClass|DIFlagFixedEnum)}},{{.*}}
+// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}}
 // CHECK: {{.*}}DIEnumerator{{.*}}name: "A",{{.*}}value: {{[0-9].*}}
 // CHECK: {{.*}}DIEnumerator{{.*}}name: "B",{{.*}}value: {{[0-9].*}}
 // CHECK: {{.*}}DIEnumerator{{.*}}name: "C",{{.*}}value: {{[0-9].*}}
diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs
index 0f17976ef49..0f78234d977 100644
--- a/src/test/codegen/enum-debug-niche-2.rs
+++ b/src/test/codegen/enum-debug-niche-2.rs
@@ -1,10 +1,8 @@
-// This test depends on a patch that was committed to upstream LLVM
-// before 7.0, then backported to the Rust LLVM fork.  It tests that
-// optimized enum debug info accurately reflects the enum layout.
+// This tests that optimized enum debug info accurately reflects the enum layout.
+// This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 // ignore-tidy-linelength
-// ignore-windows
-// min-system-llvm-version 8.0
+// ignore-msvc
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs
index 2272488375f..b718a6854dd 100644
--- a/src/test/codegen/enum-debug-niche.rs
+++ b/src/test/codegen/enum-debug-niche.rs
@@ -1,9 +1,7 @@
-// This test depends on a patch that was committed to upstream LLVM
-// before 7.0, then backported to the Rust LLVM fork.  It tests that
-// optimized enum debug info accurately reflects the enum layout.
+// This tests that optimized enum debug info accurately reflects the enum layout.
+// This is ignored for the fallback mode on MSVC due to problems with PDB.
 
-// ignore-windows
-// min-system-llvm-version 8.0
+// ignore-msvc
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs
index 3539aae42ea..095c49ac3ac 100644
--- a/src/test/codegen/enum-debug-tagged.rs
+++ b/src/test/codegen/enum-debug-tagged.rs
@@ -1,9 +1,7 @@
-// This test depends on a patch that was committed to upstream LLVM
-// before 7.0, then backported to the Rust LLVM fork.  It tests that
-// debug info for tagged (ordinary) enums is properly emitted.
+// This tests that debug info for tagged (ordinary) enums is properly emitted.
+// This is ignored for the fallback mode on MSVC due to problems with PDB.
 
-// ignore-windows
-// min-system-llvm-version 8.0
+// ignore-msvc
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/force-frame-pointers.rs b/src/test/codegen/force-frame-pointers.rs
index 4c94a601f33..637c4234654 100644
--- a/src/test/codegen/force-frame-pointers.rs
+++ b/src/test/codegen/force-frame-pointers.rs
@@ -1,4 +1,3 @@
-// min-llvm-version 8.0
 // compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y
 
 #![crate_type="lib"]
diff --git a/src/test/codegen/instrument-mcount.rs b/src/test/codegen/instrument-mcount.rs
index e4e6d5ca2b8..518a2a0da2a 100644
--- a/src/test/codegen/instrument-mcount.rs
+++ b/src/test/codegen/instrument-mcount.rs
@@ -1,4 +1,3 @@
-// min-llvm-version 8.0
 // ignore-tidy-linelength
 // compile-flags: -Z instrument-mcount
 
diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
index 63c11f59c15..85e11c10c68 100644
--- a/src/test/debuginfo/borrowed-enum.rs
+++ b/src/test/debuginfo/borrowed-enum.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
-// Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb or lldb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/enum-thinlto.rs b/src/test/debuginfo/enum-thinlto.rs
index 13577b0587f..9359e55dcee 100644
--- a/src/test/debuginfo/enum-thinlto.rs
+++ b/src/test/debuginfo/enum-thinlto.rs
@@ -1,5 +1,4 @@
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 
 // compile-flags:-g -Z thinlto
diff --git a/src/test/debuginfo/generator-objects.rs b/src/test/debuginfo/generator-objects.rs
index f19a3c71dd8..382b0231d3b 100644
--- a/src/test/debuginfo/generator-objects.rs
+++ b/src/test/debuginfo/generator-objects.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
index 72d38a6f045..adcb04da30d 100644
--- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
@@ -1,8 +1,7 @@
 // ignore-lldb: FIXME(#27089)
 // min-lldb-version: 310
 
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
index 3dc5cb807b4..678ca8df040 100644
--- a/src/test/debuginfo/generic-struct-style-enum.rs
+++ b/src/test/debuginfo/generic-struct-style-enum.rs
@@ -1,8 +1,7 @@
 // ignore-tidy-linelength
 // min-lldb-version: 310
 
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
index b16634ee6d7..89aa78a6e10 100644
--- a/src/test/debuginfo/generic-tuple-style-enum.rs
+++ b/src/test/debuginfo/generic-tuple-style-enum.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
-// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
-// read it.
-// min-system-llvm-version: 8.0
+// Require a gdb or lldb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/issue-57822.rs b/src/test/debuginfo/issue-57822.rs
index 4de88e9dae6..e9cfa3f7d69 100644
--- a/src/test/debuginfo/issue-57822.rs
+++ b/src/test/debuginfo/issue-57822.rs
@@ -1,8 +1,7 @@
 // This test makes sure that the LLDB pretty printer does not throw an exception
 // for nested closures and generators.
 
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // ignore-tidy-linelength
 
diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
index 4f75ef4fa9b..c0bd6736701 100644
--- a/src/test/debuginfo/recursive-struct.rs
+++ b/src/test/debuginfo/recursive-struct.rs
@@ -1,7 +1,6 @@
 // ignore-lldb
 
-// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 8.0
+// Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
index 5843b076b1f..34f75a4e304 100644
--- a/src/test/debuginfo/struct-style-enum.rs
+++ b/src/test/debuginfo/struct-style-enum.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
-// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
-// read it.
-// min-system-llvm-version: 8.0
+// Require a gdb or lldb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
index 4d9727a388b..87b0bc6294d 100644
--- a/src/test/debuginfo/tuple-style-enum.rs
+++ b/src/test/debuginfo/tuple-style-enum.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
-// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
-// read it.
-// min-system-llvm-version: 8.0
+// Require a gdb or lldb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
index c440ce059f7..9d938b6e369 100644
--- a/src/test/debuginfo/unique-enum.rs
+++ b/src/test/debuginfo/unique-enum.rs
@@ -1,6 +1,4 @@
-// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
-// read it.
-// min-system-llvm-version: 8.0
+// Require a gdb or lldb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs
index b2ddcf023eb..e664ecadda2 100644
--- a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs
+++ b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs
@@ -1,6 +1,5 @@
 // run-pass
 // ignore-emscripten
-// min-llvm-version 8.0
 
 #![allow(non_camel_case_types)]
 #![feature(repr_simd, platform_intrinsics)]