[Mlir-commits] [llvm] [mlir] [DebugInfo][RemoveDIs] Remove debug-intrinsic printing cmdline options (PR #131855)

Jeremy Morse llvmlistbot at llvm.org
Fri Mar 28 09:10:59 PDT 2025


https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/131855

>From 2d28c6771a7c513e65ea87c65eafbd6ce33ccb29 Mon Sep 17 00:00:00 2001
From: Jeremy Morse <jeremy.morse at sony.com>
Date: Fri, 14 Mar 2025 15:23:37 +0000
Subject: [PATCH 1/4] [DebugInfo][RemoveDIs] Remove a debug-intrinsic printing
 cmdline options

During the transition from debug intrinsics to debug records, we used
several different command line options to customise handling: the printing
of debug records to bitcode and textual could be independent of how the
debug-info was represented inside a module, whether the autoupgrader ran
could be customised. This was all valuable during development, but now that
totally removing debug intrinsics is coming up, this patch removes those
options in favour of a single flag (experimental-debuginfo-iterators),
which enables autoupgrade, in-memory debug records, and debug record
printing to bitcode and textual IR.

We need to do this ahead of removing the experimental-debuginfo-iterators
flag, to reduce the amount of test-juggling that happens at that time.

There are quite a number of weird test behaviours related to this -- some
of which I simply delete in this test. Things like
print-non-instruction-debug-info.ll , the test suite now checks for debug
records in all tests, and we don't want to check we can print as
intrinsics. Or the update_test_checks tests -- these are duplicated with
write-experimental-debuginfo=false to ensure file writing for intrinsics is
correct, but that's something we're imminently going to delete.

A short survey of curious test changes:
 * free-intrinsics.ll: we don't need to test that debug-info is a zero cost
   intrinsic, because we won't be using intrinsics in the future.
 * undef-dbg-val.ll: apparently we pinned this to non-RemoveDIs in-memory
   mode while we sorted something out; it works now either way.
 * salvage-cast-debug-info.ll: was testing intrinsics-in-memory get
   salvaged, isn't necessary now
 * localize-constexpr-debuginfo.ll: was producing "dead metadata"
   intrinsics for optimised-out variable values, dbg-records takes the
   (correct) representation of poison/undef as an operand. Looks like we
   didn't update this in the past to avoid spurious test differences.
 * Transforms/Scalarizer/dbginfo.ll: this test was explicitly testing that
   debug-info affected codegen, and we deferred updating the tests until
   now. This is just one of those silent gnochange issues that get fixed
   by RemoveDIs.

Finally: I've added a bitcode test, dbg-intrinsics-autoupgrade.ll.bc, that
checks we can autoupgrade debug intrinsics that are in bitcode into the new
debug records.
---
 llvm/docs/LangRef.rst                         |   2 +-
 llvm/lib/AsmParser/LLParser.cpp               |   4 -
 llvm/lib/Bitcode/Reader/BitcodeReader.cpp     |  23 +-
 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp     |   3 +-
 llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp |   7 +-
 llvm/lib/CodeGen/MIRPrinter.cpp               |   6 +-
 llvm/lib/IR/BasicBlock.cpp                    |   5 -
 llvm/lib/IR/IRPrintingPasses.cpp              |  16 +-
 llvm/lib/IRPrinter/IRPrintingPasses.cpp       |  14 +-
 .../Transforms/IPO/ThinLTOBitcodeWriter.cpp   |   5 +-
 .../Analysis/CostModel/X86/free-intrinsics.ll |  21 +-
 .../CostModel/free-intrinsics-datalayout.ll   |  21 +-
 .../CostModel/free-intrinsics-no_info.ll      |  21 +-
 llvm/test/Bitcode/DIExpression-aggresult.ll   |   1 -
 .../dbg-intrinsics-autoupgrade.ll}            |  39 +--
 .../Bitcode/dbg-intrinsics-autoupgrade.ll.bc  | Bin 0 -> 2256 bytes
 llvm/test/Bitcode/dbg-label-record-bc.ll      |  15 +-
 llvm/test/Bitcode/dbg-record-roundtrip.ll     |  65 +---
 llvm/test/Bitcode/upgrade-dbg-addr.ll         |   8 +-
 .../MIRDebugify/locations-and-values.mir      |   4 -
 llvm/test/DebugInfo/X86/undef-dbg-val.ll      |   2 +-
 .../roundtrip-non-instruction-debug-info.ll   | 102 ------
 .../test/DebugInfo/salvage-cast-debug-info.ll |   1 -
 .../GlobalOpt/localize-constexpr-debuginfo.ll |   9 +-
 llvm/test/Transforms/Scalarizer/dbginfo.ll    |  16 +-
 .../Inputs/various_ir_values.ll               | 175 ----------
 .../Inputs/various_ir_values.ll.expected      | 245 --------------
 .../various_ir_values.ll.funcsig.expected     | 247 --------------
 ...ious_ir_values.ll.funcsig.globals.expected | 317 ------------------
 ...us_ir_values.ll.funcsig.noglobals.expected | 245 --------------
 ...lues.ll.funcsig.transitiveglobals.expected | 306 -----------------
 .../Inputs/various_ir_values_dbgrecords.ll    |   2 +-
 .../various_ir_values_dbgrecords.ll.expected  |   2 +-
 ...s_ir_values_dbgrecords.ll.funcsig.expected |   2 +-
 ...ues_dbgrecords.ll.funcsig.globals.expected |   2 +-
 ...s_dbgrecords.ll.funcsig.noglobals.expected |   2 +-
 ...ords.ll.funcsig.transitiveglobals.expected |   2 +-
 .../update_test_checks/various_ir_values.test |  24 --
 .../tools/llvm-reduce/remove-dp-values.ll     |   4 -
 llvm/tools/llvm-as/llvm-as.cpp                |   4 +-
 llvm/tools/llvm-dis/llvm-dis.cpp              |  12 +-
 llvm/tools/llvm-link/llvm-link.cpp            |  12 +-
 llvm/tools/llvm-lto/llvm-lto.cpp              |   4 -
 llvm/tools/llvm-lto2/llvm-lto2.cpp            |   4 -
 .../Analysis/IRSimilarityIdentifierTest.cpp   |   3 +-
 llvm/unittests/Transforms/Utils/LocalTest.cpp |   8 +-
 46 files changed, 76 insertions(+), 1956 deletions(-)
 rename llvm/test/{DebugInfo/print-non-instruction-debug-info.ll => Bitcode/dbg-intrinsics-autoupgrade.ll} (52%)
 create mode 100644 llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll.bc
 delete mode 100644 llvm/test/DebugInfo/roundtrip-non-instruction-debug-info.ll
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.noglobals.expected
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected
 delete mode 100644 llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test

diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index c0567090fdd2a..9eafff138e932 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -13407,7 +13407,7 @@ an extra level of indentation. As an example:
   %inst2 = op2 %inst1, %c
 
 These debug records replace the prior :ref:`debug intrinsics<dbg_intrinsics>`.
-Debug records will be disabled if ``--write-experimental-debuginfo=false`` is
+Debug records will be disabled if ``--experimental-debuginfo-iterators=false`` is
 passed to LLVM; it is an error for both records and intrinsics to appear in the
 same module. More information about debug records can be found in the `LLVM
 Source Level Debugging <SourceLevelDebugging.html#format-common-intrinsics>`_
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index c8d792981793d..33c74e5ed8a88 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -65,8 +65,6 @@ static cl::opt<bool> AllowIncompleteIR(
 
 extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
-extern cl::opt<bool> WriteNewDbgInfoFormat;
 
 static std::string getTypeString(Type *T) {
   std::string Result;
@@ -213,8 +211,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
          "Mixed debug intrinsics/records seen without a parsing error?");
   if (PreserveInputDbgFormat == cl::boolOrDefault::BOU_TRUE) {
     UseNewDbgInfoFormat = SeenNewDbgInfoFormat;
-    WriteNewDbgInfoFormatToBitcode = SeenNewDbgInfoFormat;
-    WriteNewDbgInfoFormat = SeenNewDbgInfoFormat;
     M->setNewDbgInfoFormatFlag(SeenNewDbgInfoFormat);
   }
 
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 40e755902b724..48458815ad6c2 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -102,18 +102,8 @@ static cl::opt<bool> ExpandConstantExprs(
     cl::desc(
         "Expand constant expressions to instructions for testing purposes"));
 
-/// Load bitcode directly into RemoveDIs format (use debug records instead
-/// of debug intrinsics). UNSET is treated as FALSE, so the default action
-/// is to do nothing. Individual tools can override this to incrementally add
-/// support for the RemoveDIs format.
-cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat(
-    "load-bitcode-into-experimental-debuginfo-iterators", cl::Hidden,
-    cl::desc("Load bitcode directly into the new debug info format (regardless "
-             "of input format)"));
 extern cl::opt<bool> UseNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
-extern cl::opt<bool> WriteNewDbgInfoFormat;
 
 namespace {
 
@@ -4494,14 +4484,9 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
 Error BitcodeReader::parseModule(uint64_t ResumeBit,
                                  bool ShouldLazyLoadMetadata,
                                  ParserCallbacks Callbacks) {
-  // Load directly into RemoveDIs format if LoadBitcodeIntoNewDbgInfoFormat
-  // has been set to true and we aren't attempting to preserve the existing
-  // format in the bitcode (default action: load into the old debug format).
-  if (PreserveInputDbgFormat != cl::boolOrDefault::BOU_TRUE) {
-    TheModule->IsNewDbgInfoFormat =
-        UseNewDbgInfoFormat &&
-        LoadBitcodeIntoNewDbgInfoFormat != cl::boolOrDefault::BOU_FALSE;
-  }
+  // In preparation for the deletion of debug-intrinsics, don't allow module
+  // loading to escape intrinsics being autoupgraded to debug records.
+  TheModule->IsNewDbgInfoFormat = UseNewDbgInfoFormat;
 
   this->ValueTypeCallback = std::move(Callbacks.ValueType);
   if (ResumeBit) {
@@ -7028,8 +7013,6 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
         SeenAnyDebugInfo ? SeenDebugRecord : F->getParent()->IsNewDbgInfoFormat;
     if (SeenAnyDebugInfo) {
       UseNewDbgInfoFormat = SeenDebugRecord;
-      WriteNewDbgInfoFormatToBitcode = SeenDebugRecord;
-      WriteNewDbgInfoFormat = SeenDebugRecord;
     }
     // If the module's debug info format doesn't match the observed input
     // format, then set its format now; we don't need to call the conversion
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index f6510a7a1549d..de6c3e64393b3 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -103,7 +103,6 @@ namespace llvm {
 extern FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold;
 }
 
-extern bool WriteNewDbgInfoFormatToBitcode;
 extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
 
 namespace {
@@ -3678,7 +3677,7 @@ void ModuleBitcodeWriter::writeFunction(
       // they come after the instruction so that it's easy to attach them again
       // when reading the bitcode, even though conceptually the debug locations
       // start "before" the instruction.
-      if (I.hasDbgRecords() && WriteNewDbgInfoFormatToBitcode) {
+      if (I.hasDbgRecords()) {
         /// Try to push the value only (unwrapped), otherwise push the
         /// metadata wrapped value. Returns true if the value was pushed
         /// without the ValueAsMetadata wrapper.
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
index 5f66e1ea0a835..c33ac41b4f068 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
@@ -18,11 +18,8 @@
 #include "llvm/Pass.h"
 using namespace llvm;
 
-extern bool WriteNewDbgInfoFormatToBitcode;
-
 PreservedAnalyses BitcodeWriterPass::run(Module &M, ModuleAnalysisManager &AM) {
-  ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat &&
-                                                WriteNewDbgInfoFormatToBitcode);
+  ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat);
   if (M.IsNewDbgInfoFormat)
     M.removeDebugIntrinsicDeclarations();
 
@@ -55,7 +52,7 @@ namespace {
 
     bool runOnModule(Module &M) override {
       ScopedDbgInfoFormatSetter FormatSetter(
-          M, M.IsNewDbgInfoFormat && WriteNewDbgInfoFormatToBitcode);
+          M, M.IsNewDbgInfoFormat);
       if (M.IsNewDbgInfoFormat)
         M.removeDebugIntrinsicDeclarations();
 
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index e9bd60e4e2597..2f08fcda1fbd0 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -69,7 +69,7 @@ static cl::opt<bool> SimplifyMIR(
 static cl::opt<bool> PrintLocations("mir-debug-loc", cl::Hidden, cl::init(true),
                                     cl::desc("Print MIR debug-locations"));
 
-extern cl::opt<bool> WriteNewDbgInfoFormat;
+extern cl::opt<bool> UseNewDbgInfoFormat;
 
 namespace {
 
@@ -1050,7 +1050,7 @@ void MIRFormatter::printIRValue(raw_ostream &OS, const Value &V,
 
 void llvm::printMIR(raw_ostream &OS, const Module &M) {
   ScopedDbgInfoFormatSetter FormatSetter(const_cast<Module &>(M),
-                                         WriteNewDbgInfoFormat);
+                                         UseNewDbgInfoFormat);
 
   yaml::Output Out(OS);
   Out << const_cast<Module &>(M);
@@ -1061,7 +1061,7 @@ void llvm::printMIR(raw_ostream &OS, const MachineModuleInfo &MMI,
   // RemoveDIs: as there's no textual form for DbgRecords yet, print debug-info
   // in dbg.value format.
   ScopedDbgInfoFormatSetter FormatSetter(
-      const_cast<Function &>(MF.getFunction()), WriteNewDbgInfoFormat);
+      const_cast<Function &>(MF.getFunction()), UseNewDbgInfoFormat);
 
   MIRPrinter Printer(OS, MMI);
   Printer.print(MF);
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index dca42a57fa9e3..d9ff0687480a4 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -44,11 +44,6 @@ cl::opt<cl::boolOrDefault> PreserveInputDbgFormat(
              "contain debug records or intrinsics. Ignored in llvm-link, "
              "llvm-lto, and llvm-lto2."));
 
-bool WriteNewDbgInfoFormatToBitcode /*set default value in cl::init() below*/;
-cl::opt<bool, true> WriteNewDbgInfoFormatToBitcode2(
-    "write-experimental-debuginfo-iterators-to-bitcode", cl::Hidden,
-    cl::location(WriteNewDbgInfoFormatToBitcode), cl::init(true));
-
 DbgMarker *BasicBlock::createMarker(Instruction *I) {
   assert(IsNewDbgInfoFormat &&
          "Tried to create a marker in a non new debug-info block!");
diff --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp
index 0dab0c9381635..96396d06ebba3 100644
--- a/llvm/lib/IR/IRPrintingPasses.cpp
+++ b/llvm/lib/IR/IRPrintingPasses.cpp
@@ -23,11 +23,7 @@
 
 using namespace llvm;
 
-cl::opt<bool> WriteNewDbgInfoFormat(
-    "write-experimental-debuginfo",
-    cl::desc("Write debug info in the new non-intrinsic format. Has no effect "
-             "if --preserve-input-debuginfo-format=true."),
-    cl::init(true));
+extern cl::opt<bool> UseNewDbgInfoFormat;
 
 namespace {
 
@@ -45,13 +41,11 @@ class PrintModulePassWrapper : public ModulePass {
         ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {}
 
   bool runOnModule(Module &M) override {
-    // RemoveDIs: Regardless of the format we've processed this module in, use
-    // `WriteNewDbgInfoFormat` to determine which format we use to write it.
-    ScopedDbgInfoFormatSetter FormatSetter(M, WriteNewDbgInfoFormat);
+    ScopedDbgInfoFormatSetter FormatSetter(M, UseNewDbgInfoFormat);
     // Remove intrinsic declarations when printing in the new format.
     // TODO: Move this into Module::setIsNewDbgInfoFormat when we're ready to
     // update test output.
-    if (WriteNewDbgInfoFormat)
+    if (UseNewDbgInfoFormat)
       M.removeDebugIntrinsicDeclarations();
 
     if (llvm::isFunctionInPrintList("*")) {
@@ -93,9 +87,7 @@ class PrintFunctionPassWrapper : public FunctionPass {
 
   // This pass just prints a banner followed by the function as it's processed.
   bool runOnFunction(Function &F) override {
-    // RemoveDIs: Regardless of the format we've processed this function in, use
-    // `WriteNewDbgInfoFormat` to determine which format we use to write it.
-    ScopedDbgInfoFormatSetter FormatSetter(F, WriteNewDbgInfoFormat);
+    ScopedDbgInfoFormatSetter FormatSetter(F, UseNewDbgInfoFormat);
 
     if (isFunctionInPrintList(F.getName())) {
       if (forcePrintModuleIR())
diff --git a/llvm/lib/IRPrinter/IRPrintingPasses.cpp b/llvm/lib/IRPrinter/IRPrintingPasses.cpp
index 026fa4d746d8b..e03e338c999e8 100644
--- a/llvm/lib/IRPrinter/IRPrintingPasses.cpp
+++ b/llvm/lib/IRPrinter/IRPrintingPasses.cpp
@@ -1,4 +1,4 @@
-//===--- IRPrintingPasses.cpp - Module and Function printing passes -------===//
+//===--- iRPrintingPasses.cpp - Module and Function printing passes -------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -22,7 +22,7 @@
 
 using namespace llvm;
 
-extern cl::opt<bool> WriteNewDbgInfoFormat;
+extern cl::opt<bool> UseNewDbgInfoFormat;
 
 PrintModulePass::PrintModulePass() : OS(dbgs()) {}
 PrintModulePass::PrintModulePass(raw_ostream &OS, const std::string &Banner,
@@ -33,13 +33,11 @@ PrintModulePass::PrintModulePass(raw_ostream &OS, const std::string &Banner,
       EmitSummaryIndex(EmitSummaryIndex) {}
 
 PreservedAnalyses PrintModulePass::run(Module &M, ModuleAnalysisManager &AM) {
-  // RemoveDIs: Regardless of the format we've processed this module in, use
-  // `WriteNewDbgInfoFormat` to determine which format we use to write it.
-  ScopedDbgInfoFormatSetter FormatSetter(M, WriteNewDbgInfoFormat);
+  ScopedDbgInfoFormatSetter FormatSetter(M, UseNewDbgInfoFormat);
   // Remove intrinsic declarations when printing in the new format.
   // TODO: Move this into Module::setIsNewDbgInfoFormat when we're ready to
   // update test output.
-  if (WriteNewDbgInfoFormat)
+  if (UseNewDbgInfoFormat)
     M.removeDebugIntrinsicDeclarations();
 
   if (llvm::isFunctionInPrintList("*")) {
@@ -77,9 +75,7 @@ PrintFunctionPass::PrintFunctionPass(raw_ostream &OS, const std::string &Banner)
 
 PreservedAnalyses PrintFunctionPass::run(Function &F,
                                          FunctionAnalysisManager &) {
-  // RemoveDIs: Regardless of the format we've processed this function in, use
-  // `WriteNewDbgInfoFormat` to determine which format we use to write it.
-  ScopedDbgInfoFormatSetter FormatSetter(F, WriteNewDbgInfoFormat);
+  ScopedDbgInfoFormatSetter FormatSetter(F, UseNewDbgInfoFormat);
 
   if (isFunctionInPrintList(F.getName())) {
     if (forcePrintModuleIR())
diff --git a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
index cd0e412bdf353..88abc6e560580 100644
--- a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+++ b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
@@ -575,14 +575,13 @@ bool writeThinLTOBitcode(raw_ostream &OS, raw_ostream *ThinLinkOS,
 }
 
 } // anonymous namespace
-extern bool WriteNewDbgInfoFormatToBitcode;
+
 PreservedAnalyses
 llvm::ThinLTOBitcodeWriterPass::run(Module &M, ModuleAnalysisManager &AM) {
   FunctionAnalysisManager &FAM =
       AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
 
-  ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat &&
-                                                WriteNewDbgInfoFormatToBitcode);
+  ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat);
   if (M.IsNewDbgInfoFormat)
     M.removeDebugIntrinsicDeclarations();
 
diff --git a/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll b/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
index 1e9fd0df78922..a8c5c43c3a9f8 100644
--- a/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
+++ b/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
@@ -1,9 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-;; Pin this test to not use "RemoveDIs" non-intrinsic debug-info. We get the
-;; correct output in that mode, but it generates spurious test changes, so
-;; avoid that for the moment.
-; RUN: opt -mtriple=x86_64-- -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-SIZE
-; RUN: opt -mtriple=x86_64-- -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-THROUGHPUT
+; RUN: opt -mtriple=x86_64-- -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - | FileCheck %s --check-prefix=CHECK-SIZE
+; RUN: opt -mtriple=x86_64-- -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - | FileCheck %s --check-prefix=CHECK-THROUGHPUT
 
 define i32 @trivially_free() {
 ; CHECK-SIZE-LABEL: 'trivially_free'
@@ -11,9 +8,6 @@ define i32 @trivially_free() {
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -31,9 +25,6 @@ define i32 @trivially_free() {
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -50,10 +41,6 @@ define i32 @trivially_free() {
   call void @llvm.assume(i1 undef)
   call void @llvm.experimental.noalias.scope.decl(metadata !4)
   call void @llvm.sideeffect()
-  call void @llvm.dbg.assign(metadata ptr undef, metadata !0, metadata !DIExpression(), metadata !10, metadata ptr undef, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.declare(metadata ptr undef, metadata !0, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.value(metadata i64 undef, i64 undef, metadata !DIExpression(), metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.label(metadata !2), !dbg !8
   %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
   call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
   %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -71,10 +58,6 @@ declare i32 @llvm.annotation.i32(i32, ptr, ptr, i32)
 declare void @llvm.assume(i1)
 declare void @llvm.experimental.noalias.scope.decl(metadata)
 declare void @llvm.sideeffect()
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
-declare void @llvm.dbg.label(metadata)
 declare ptr @llvm.invariant.start.p0(i64, ptr)
 declare void @llvm.invariant.end.p0(ptr, i64, ptr)
 declare ptr @llvm.launder.invariant.group.p0(ptr)
diff --git a/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll b/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
index 09fbd68d95e92..560af3d2b48fc 100644
--- a/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
+++ b/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
@@ -1,9 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-;; Pin this test to not use "RemoveDIs" non-intrinsic debug-info. We get the
-;; correct output in that mode, but it generates spurious test changes, so
-;; avoid that for the moment.
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-SIZE
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-THROUGHPUT
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - | FileCheck %s --check-prefix=CHECK-SIZE
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - | FileCheck %s --check-prefix=CHECK-THROUGHPUT
 
 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 
@@ -13,9 +10,6 @@ define i32 @trivially_free() {
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -35,9 +29,6 @@ define i32 @trivially_free() {
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -56,10 +47,6 @@ define i32 @trivially_free() {
   call void @llvm.assume(i1 undef)
   call void @llvm.experimental.noalias.scope.decl(metadata !4)
   call void @llvm.sideeffect()
-  call void @llvm.dbg.assign(metadata ptr undef, metadata !0, metadata !DIExpression(), metadata !10, metadata ptr undef, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.declare(metadata ptr undef, metadata !0, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.value(metadata i64 undef, i64 undef, metadata !DIExpression(), metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.label(metadata !2), !dbg !8
   %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
   call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
   %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -79,10 +66,6 @@ declare i32 @llvm.annotation.i32(i32, ptr, ptr, i32)
 declare void @llvm.assume(i1)
 declare void @llvm.experimental.noalias.scope.decl(metadata)
 declare void @llvm.sideeffect()
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
-declare void @llvm.dbg.label(metadata)
 declare ptr @llvm.invariant.start.p0(i64, ptr)
 declare void @llvm.invariant.end.p0(ptr, i64, ptr)
 declare ptr @llvm.launder.invariant.group.p0(ptr)
diff --git a/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll b/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
index 3e78c62a6fe25..53828f2f07277 100644
--- a/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
+++ b/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
@@ -1,9 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-;; Pin this test to not use "RemoveDIs" non-intrinsic debug-info. We get the
-;; correct output in that mode, but it generates spurious test changes, so
-;; avoid that for the moment.
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-SIZE
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - --experimental-debuginfo-iterators=false | FileCheck %s --check-prefix=CHECK-THROUGHPUT
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size %s -S -o - | FileCheck %s --check-prefix=CHECK-SIZE
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput %s -S -o - | FileCheck %s --check-prefix=CHECK-THROUGHPUT
 
 define i32 @trivially_free() {
 ; CHECK-SIZE-LABEL: 'trivially_free'
@@ -11,9 +8,6 @@ define i32 @trivially_free() {
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -33,9 +27,6 @@ define i32 @trivially_free() {
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.assume(i1 undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.experimental.noalias.scope.decl(metadata !3)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
-; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !10), !dbg !9
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
 ; CHECK-THROUGHPUT-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -54,10 +45,6 @@ define i32 @trivially_free() {
   call void @llvm.assume(i1 undef)
   call void @llvm.experimental.noalias.scope.decl(metadata !4)
   call void @llvm.sideeffect()
-  call void @llvm.dbg.assign(metadata ptr undef, metadata !0, metadata !DIExpression(), metadata !10, metadata ptr undef, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.declare(metadata ptr undef, metadata !0, metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.value(metadata i64 undef, i64 undef, metadata !DIExpression(), metadata !DIExpression()), !dbg !8
-  call void @llvm.dbg.label(metadata !2), !dbg !8
   %a1 = call ptr @llvm.invariant.start.p0(i64 1, ptr undef)
   call void @llvm.invariant.end.p0(ptr undef, i64 1, ptr undef)
   %a2 = call ptr @llvm.launder.invariant.group.p0(ptr undef)
@@ -77,10 +64,6 @@ declare i32 @llvm.annotation.i32(i32, ptr, ptr, i32)
 declare void @llvm.assume(i1)
 declare void @llvm.experimental.noalias.scope.decl(metadata)
 declare void @llvm.sideeffect()
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
-declare void @llvm.dbg.label(metadata)
 declare ptr @llvm.invariant.start.p0(i64, ptr)
 declare void @llvm.invariant.end.p0(ptr, i64, ptr)
 declare ptr @llvm.launder.invariant.group.p0(ptr)
diff --git a/llvm/test/Bitcode/DIExpression-aggresult.ll b/llvm/test/Bitcode/DIExpression-aggresult.ll
index 309ca1f1d47b1..c7f91492f8e2e 100644
--- a/llvm/test/Bitcode/DIExpression-aggresult.ll
+++ b/llvm/test/Bitcode/DIExpression-aggresult.ll
@@ -1,5 +1,4 @@
 ; RUN: llvm-dis -o - %s.bc | FileCheck %s
-; RUN: llvm-dis -o - %s.bc --load-bitcode-into-experimental-debuginfo-iterators=true | FileCheck %s
 %class.A = type { i32, i32, i32, i32 }
 
 define void @_Z3fooi(%class.A* sret(%class.A) %agg.result) #0 !dbg !3 {
diff --git a/llvm/test/DebugInfo/print-non-instruction-debug-info.ll b/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
similarity index 52%
rename from llvm/test/DebugInfo/print-non-instruction-debug-info.ll
rename to llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
index 490f24ff76ff5..862b2a9345ffc 100644
--- a/llvm/test/DebugInfo/print-non-instruction-debug-info.ll
+++ b/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
@@ -1,39 +1,24 @@
-;; Test that we can write in the new debug info format.
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators=false --write-experimental-debuginfo=false < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG --implicit-check-not=llvm.dbg
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators=false --write-experimental-debuginfo=true < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,NEWDBG --implicit-check-not=llvm.dbg
+;; Test that we can read old debug intrinsics from bitcode, and autoupgrade
+;; them to the new debug-records format.
+; RUN: opt --passes=verify %s.bc -o - -S \
+; RUN:   | FileCheck %s --implicit-check-not=llvm.dbg
 
-;; Test also that the new flag is independent of the flag that enables use of
-;; these non-instruction debug info during LLVM passes.
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators=true --write-experimental-debuginfo=false < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG --implicit-check-not=llvm.dbg
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators=true --write-experimental-debuginfo=true < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,NEWDBG --implicit-check-not=llvm.dbg
+;; Assembled with llvm-as ./brains.ll -o out.bc --write-experimental-debuginfo-iterators-to-bitcode=false
+;; immediately before the latter flag was deleted.
 
 ; CHECK: @f(i32 %[[VAL_A:[0-9a-zA-Z]+]])
 ; CHECK-NEXT: entry:
-; OLDDBG-NEXT: call void @llvm.dbg.value(metadata i32 %[[VAL_A]], metadata ![[VAR_A:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC_1:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_value(i32 %[[VAL_A]], ![[VAR_A:[0-9]+]], !DIExpression(), ![[LOC_1:[0-9]+]])
+; CHECK-NEXT: {{^}}    #dbg_value(i32 %[[VAL_A]], ![[VAR_A:[0-9]+]], !DIExpression(), ![[LOC_1:[0-9]+]])
 ; CHECK-NEXT: {{^}}  %[[VAL_B:[0-9a-zA-Z]+]] = alloca
-; OLDDBG-NEXT: call void @llvm.dbg.declare(metadata ptr %[[VAL_B]], metadata ![[VAR_B:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC_2:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_declare(ptr %[[VAL_B]], ![[VAR_B:[0-9]+]], !DIExpression(), ![[LOC_2:[0-9]+]])
+; CHECK-NEXT: {{^}}    #dbg_declare(ptr %[[VAL_B]], ![[VAR_B:[0-9]+]], !DIExpression(), ![[LOC_2:[0-9]+]])
 ; CHECK-NEXT: {{^}}  %[[VAL_ADD:[0-9a-zA-Z]+]] = add i32 %[[VAL_A]], 5
-; OLDDBG-NEXT: call void @llvm.dbg.value(metadata !DIArgList(i32 %[[VAL_A]], i32 %[[VAL_ADD]]), metadata ![[VAR_A]], metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg ![[LOC_3:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_value(!DIArgList(i32 %[[VAL_A]], i32 %[[VAL_ADD]]), ![[VAR_A]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus), ![[LOC_3:[0-9]+]])
-; OLDDBG-NEXT: call void @llvm.dbg.label(metadata ![[LABEL_ID:[0-9]+]]), !dbg ![[LOC_3]]
-; NEWDBG-NEXT: {{^}}    #dbg_label(![[LABEL_ID:[0-9]+]], ![[LOC_3]])
+; CHECK-NEXT: {{^}}    #dbg_value(!DIArgList(i32 %[[VAL_A]], i32 %[[VAL_ADD]]), ![[VAR_A]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus), ![[LOC_3:[0-9]+]])
+; CHECK-NEXT: {{^}}    #dbg_label(![[LABEL_ID:[0-9]+]], ![[LOC_3]])
 ; CHECK-NEXT: {{^}}  store i32 %[[VAL_ADD]]{{.+}}, !DIAssignID ![[ASSIGNID:[0-9]+]]
-; OLDDBG-NEXT: call void @llvm.dbg.assign(metadata i32 %[[VAL_ADD]], metadata ![[VAR_B]], metadata !DIExpression(), metadata ![[ASSIGNID]], metadata ptr %[[VAL_B]], metadata !DIExpression()), !dbg ![[LOC_4:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_assign(i32 %[[VAL_ADD]], ![[VAR_B]], !DIExpression(), ![[ASSIGNID]], ptr %[[VAL_B]], !DIExpression(), ![[LOC_4:[0-9]+]])
-; OLDDBG-NEXT: call void @llvm.dbg.assign(metadata ![[EMPTY:[0-9]+]], metadata ![[VAR_B]], metadata !DIExpression(), metadata ![[ASSIGNID]], metadata ![[EMPTY]], metadata !DIExpression()), !dbg ![[LOC_4]]
-; NEWDBG-NEXT: {{^}}    #dbg_assign(![[EMPTY:[0-9]+]], ![[VAR_B]], !DIExpression(), ![[ASSIGNID]], ![[EMPTY]], !DIExpression(), ![[LOC_4]])
+; CHECK-NEXT: {{^}}    #dbg_assign(i32 %[[VAL_ADD]], ![[VAR_B]], !DIExpression(), ![[ASSIGNID]], ptr %[[VAL_B]], !DIExpression(), ![[LOC_4:[0-9]+]])
+; CHECK-NEXT: {{^}}    #dbg_assign(![[EMPTY:[0-9]+]], ![[VAR_B]], !DIExpression(), ![[ASSIGNID]], ![[EMPTY]], !DIExpression(), ![[LOC_4]])
 ; CHECK-NEXT: {{^}}  ret i32
 
-; OLDDBG-DAG: declare void @llvm.dbg.value
-; OLDDBG-DAG: declare void @llvm.dbg.declare
-; OLDDBG-DAG: declare void @llvm.dbg.assign
-
 ; CHECK-DAG: llvm.dbg.cu
 ; CHECK-DAG: ![[VAR_A]] = !DILocalVariable(name: "a"
 ; CHECK-DAG: ![[VAR_B]] = !DILocalVariable(name: "b"
diff --git a/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll.bc b/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll.bc
new file mode 100644
index 0000000000000000000000000000000000000000..99f5452e8144581c37c31435ef227f45b9109468
GIT binary patch
literal 2256
zcmY*aeN0=|6~E@$eg at q4UK-Qb<=K0NkXc(t9(EvhY%AE$Tbz|@PMS?j+Y~<=8)ykJ
zHsK at LCV#b$Zr0{RNMmg#L4&qT`G>S<in?gBd6apHmyxR4P{)uxAYY;Zt!(PrtlfF0
z&9p1sb9L^y_uO;N at 0@epTyCXRgOCCt6i~B!pZoUje)-(Tv)`yM?DfdZ3S?9xq^v at y
zw#tZLK{}XtqVc?|AU~?4%(e@%w7N;5(i!AG4#cUiR=F?Ky3>?dV^wLNtuedDypefh
zqvuH>L%A+gbrn=sH4OK)G3F04vpd~MWOp at qvQx>|t8^lMvrgyEWSS`bp}_(|uP_Kb
z0dF;g<<uMQWc9A&K+X@$`MfpN`#cK at w|k$8dbJUy8ax at KmTLlImub%9IgvIZbW962
z!`=GVOP|8POB!?-eS)&_L+B%BMuCokTn6&pNrav at b`X31^6WF at ul^R>^O|$Is!Ec4
zHmVr(@`=RrNJf3WgXFpFgG3EeiA7~Ij<m;r at Kc$*{qYeBabG$ZA^z`7c8T$wa3RFh
z%6Dut8zv~-u8wS`df$-+IrpOm(@SPk!i}ziZ8t%cMHQ##%XC;HbB=M=w3u<n at zD`H
zHZh>SgUI(OVmnS))NaFEUVm$f4zr5Nu~dB#a~3#f26GliGJ_HPoC+WH3XuqYHi8X}
z2oXlm6?YLES)$C6{Vch<MQr&93pKA_G15y${Ty!yv#;2%r|gTIZ5DG}PdU<<y||?r
z^5f at v@Pj=<6lh$CWQB+yA2Q)XA1XlYa9lX45(czFbV3-NNIdg!i+ETf{+S~-SS(PO
zqSvPAVuddA^bI3DpU~gnm4D81wgP9HsL*Sob)2(~VfJxxKRo&<X at 3{9&xq>Z_X?3t
zAsR^y_TVFaVNfd!P71nP&yx=k`41nlmL*o($udK1fESEOznnMBxeV_Z>E(oBxkRs(
z^$%o*u=bdBhC6gIWiR^ne&&c at 7#_h#CXRJ%XGtjnh8GMsc>11EzmnJgP-c(}HtM%{
z<%yS4)}m;i;hYeVM{|xf&OQdLn0dPfJQaq)9u<DpghwY5-(97MjU2J=BR*go^Y6F}
zYvnylW&H{m;MLh at QqI{_eOk0;I9pM4T+7=EBKYVidS?ezI9N3R0qhiXe_bFp{N(#3
z<rYJ(v*bEM{>w-7Q^YDu0Q*5ndA~%g`G^nM#=mdy^jt!}RNk{;)Za1c=Z$(m at SgDt
zVdfY1>zwl%W*bl0ik;U1eQ@?H*y$C9BZBVcU1F0Z%O&D|J9&Q+UJ+$j>@p6%oScAE
zks>^}2v8={E?Y^2&^ZCAV*C80{>GHP<T9+}>G0klOOz#iNl>!Ra>mpdEgtg<CntsP
z$KmePahW3{I>troB6kSVsR$8MdyRE&-T<cF%Il9OG~teJme^#-&60A{M{Y~1i1m{4
z4nvj~!P!ggsi7WxR3+$+KYdNKLmp0Z)*{3Zvt?6`BIbZ#j$=~QjWP%wf;DRJGTfM2
zR~<EbnZ`us{Q29SNy^maXfeBgk~LoHVP+8SYP}%!u}HMHf3P{YfACZ!*vI#GGee<h
ztoL+3(_(FAn_15=9}P3#+S&7j0%y9Jqy6F2pYIF at d-&+dSnt_TqsrBiq_mByJS+ at w
z=J7iAkI*kDE4+dzsZn5c?F`DPb86AWSky<(7g^JSnPUrHe=^Dk-+VD<+-;BPuGBYm
zngbHsd#>?H at XN85V6FYN`cTARs%vZeZQIWdykS20*0H1t{Th12S3r4fP1FRnho9|?
zOaR^zRJKJid52z at dg7i-Y7G$Uot%E^z^b3P>w{7u*QA0W at A`=CnRo&pHB~BkM1U-m
z^0+f{QMAs=?9(adxLEZfGzEIOOfNI^8ZXg%3Bw#uFHX^go#f;5GIARL1N`Dd?buEd
zDE?#x$d{n7MMyzAWIXhv0%n&2avMS;^=7>2m`>R*LcwFs$&>?%KPyU|muC>_f_1mt
z<$$jT8DKUXDP)g5HIL;fxgrd(@qs=*5b8r$E?@e2JX}&DtUWD at lL+}wQ}T0ETy0`e
z4O(J)-rMI!ZT^c5{%=}(K>4ah_U5ZDNSP&OaOJIBXScS=i<-Rh0DHiMHePtS+CAAp
z#Y0JojbScz0W~UdD(Ux`?!zZ?_`39!<URo+W?U@}Eh>8CGIPytWo|4lOEX%{*FORo
zxe4U(ERavxpiiw)qAzM$9%Zz2yDI6*Pf7wxBHYJ7NQ?6AERWcL4;fX;BXbq)X&Kws
zuF9hhEf`P(2KaXj$Vt~q(h=@I(%lC at 4qpROdC8!Bd>TEH#1AF$yOJ2~9O6*~EJ<Us
z%3uE*O1{7%F at hAgJ9dR@q|hT-3qtTcq3_5`@0sP{_$i&*l9L251{la=Sj`00kVey$
zx|8<52Ou at T`Xn~~Z;220^$neB?h14_5Al6xLXWww5R_T;e>@+H^>+6^7FPf at L*X^E
z-MxcMFc1#5u&owArZo_5HHR#gaG<UAprx(tV2iDdZEFby!WOord4C|v_x8t{`}(BE
GVf+_Yvl55^

literal 0
HcmV?d00001

diff --git a/llvm/test/Bitcode/dbg-label-record-bc.ll b/llvm/test/Bitcode/dbg-label-record-bc.ll
index 02142e5e8cf41..226b6ca2678d6 100644
--- a/llvm/test/Bitcode/dbg-label-record-bc.ll
+++ b/llvm/test/Bitcode/dbg-label-record-bc.ll
@@ -1,12 +1,10 @@
 ;; Tests that we can parse and print a function containing a debug label record
-;; and no other debug record kinds.
+;; and no other debug record kinds. llvm-as should autoupgrade the intrinsic
+;; below into a debug record, that then round-trips through opt.
 
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=true %s -o - \
-; RUN: | opt -S | FileCheck %s --check-prefixes=CHECK,INTRINSIC
-
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=true %s -o - \
-; RUN: | opt -S --preserve-input-debuginfo-format=true \
-; RUN: | FileCheck %s --check-prefixes=CHECK,RECORD
+; RUN: llvm-as %s -o - \
+; RUN: | opt -S \
+; RUN: | FileCheck %s
 
 source_filename = "bbi-94196.c"
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
@@ -14,8 +12,7 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK-LABEL: void @foo()
 ; CHECK: bar:
-; INTRINSIC-NEXT: #dbg_label(![[LABEL:[0-9]+]],  ![[LOC:[0-9]+]]
-; RECORD-NEXT: #dbg_label(![[LABEL:[0-9]+]], ![[LOC:[0-9]+]])
+; CHECK-NEXT: #dbg_label(![[LABEL:[0-9]+]], ![[LOC:[0-9]+]])
 
 ; CHECK-DAG: ![[LABEL]] = !DILabel({{.*}}name: "bar"
 ; CHECK-DAG: ![[LOC]] = !DILocation(line: 5, column: 1
diff --git a/llvm/test/Bitcode/dbg-record-roundtrip.ll b/llvm/test/Bitcode/dbg-record-roundtrip.ll
index cc83fdd4fa538..95b5b913af001 100644
--- a/llvm/test/Bitcode/dbg-record-roundtrip.ll
+++ b/llvm/test/Bitcode/dbg-record-roundtrip.ll
@@ -1,57 +1,23 @@
 ;; Roundtrip tests.
 
-;; Load RemoveDIs mode in llvm-dis but write out debug intrinsics.
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=true %s -o - \
-; RUN: | llvm-dis --load-bitcode-into-experimental-debuginfo-iterators=true --write-experimental-debuginfo=false \
-; RUN: | FileCheck %s
-
-;; Load and write RemoveDIs mode in llvm-dis.
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=true %s -o - \
-; RUN: | llvm-dis --load-bitcode-into-experimental-debuginfo-iterators=true --write-experimental-debuginfo=true \
-; RUN: | FileCheck %s --check-prefixes=RECORDS
-
-;; Load intrinsics directly into the new format (auto-upgrade).
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=false %s -o - \
-; RUN: | llvm-dis --load-bitcode-into-experimental-debuginfo-iterators=true --write-experimental-debuginfo=true \
-; RUN: | FileCheck %s --check-prefixes=RECORDS
-
-;; When preserving, we should output the format the bitcode was written in
-;; regardless of the value of the write flag.
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=true %s -o - \
-; RUN: | llvm-dis --preserve-input-debuginfo-format=true --write-experimental-debuginfo=false \
+;; Tests that bitcode can be printed and interpreted by llvm-dis with non-intrinsic
+;; debug records -- llvm-as will autoupgrade.
+; RUN: llvm-as %s -o - \
+; RUN: | llvm-dis \
 ; RUN: | FileCheck %s --check-prefixes=RECORDS
 
-; RUN: llvm-as --write-experimental-debuginfo-iterators-to-bitcode=false %s -o - \
-; RUN: | llvm-dis --preserve-input-debuginfo-format=true --write-experimental-debuginfo=true \
-; RUN: | FileCheck %s
-
 ;; Check that verify-uselistorder passes regardless of input format.
-; RUN: llvm-as %s --write-experimental-debuginfo-iterators-to-bitcode=true -o - | verify-uselistorder
+; RUN: llvm-as %s -o - | verify-uselistorder
 ; RUN: verify-uselistorder %s
 
 ;; Confirm we're producing RemoveDI records from various tools.
-; RUN: opt %s -o - --write-experimental-debuginfo-iterators-to-bitcode=true | llvm-bcanalyzer - | FileCheck %s --check-prefix=BITCODE
-; RUN: llvm-as %s -o - --write-experimental-debuginfo-iterators-to-bitcode=true | llvm-bcanalyzer - | FileCheck %s --check-prefix=BITCODE
+; RUN: opt %s -o - | llvm-bcanalyzer - | FileCheck %s --check-prefix=BITCODE
+; RUN: llvm-as %s -o - | llvm-bcanalyzer - | FileCheck %s --check-prefix=BITCODE
 ; BITCODE-DAG: DEBUG_RECORD_LABEL
 ; BITCODE-DAG: DEBUG_RECORD_VALUE
 ; BITCODE-DAG: DEBUG_RECORD_ASSIGN
 ; BITCODE-DAG: DEBUG_RECORD_DECLARE
 
-;; Check that llvm-link doesn't explode if we give it different formats to
-;; link.
-;; NOTE: This test fails intermittently on linux if the llvm-as output is piped
-;; into llvm-link in the RUN lines below, unless the verify-uselistorder RUN
-;; lines above are removed. Write to a temporary file to avoid that weirdness.
-;; NOTE2: Unfortunately, the above only stopped it occuring on my machine.
-;; It failed again intermittently here:
-;; https://lab.llvm.org/buildbot/#/builders/245/builds/21930
-;; Allow this test to fail-over twice, until this strangeness is understood.
-; ALLOW_RETRIES: 2
-; RUN: llvm-as %s --experimental-debuginfo-iterators=true --write-experimental-debuginfo-iterators-to-bitcode=true -o %t
-; RUN: llvm-link %t %s --experimental-debuginfo-iterators=false -o /dev/null
-; RUN: llvm-as %s --experimental-debuginfo-iterators=false -o %t
-; RUN: llvm-link %t %s --experimental-debuginfo-iterators=true
-
 ;; Checks inline.
 
 @g = internal dso_local global i32 0, align 4, !dbg !0
@@ -60,10 +26,6 @@ define internal dso_local noundef i32 @_Z3funv(i32 %p, ptr %storage) !dbg !13 {
 entry:
 ;; Dbg record at top of block, check dbg.value configurations.
 ; CHECK: entry:
-; CHECK-NEXT: dbg.value(metadata i32 %p, metadata ![[e:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg:[0-9]+]]
-; CHECK-NEXT: dbg.value(metadata ![[empty:[0-9]+]], metadata ![[e]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.value(metadata i32 poison, metadata ![[e]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.value(metadata i32 1, metadata ![[f:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
 ; RECORDS: entry:
 ; RECORDS-NEXT: dbg_value(i32 %p, ![[e:[0-9]+]], !DIExpression(), ![[dbg:[0-9]+]])
 ; RECORDS-NEXT: dbg_value(![[empty:[0-9]+]], ![[e]], !DIExpression(), ![[dbg]])
@@ -74,25 +36,16 @@ entry:
   tail call void @llvm.dbg.value(metadata i32 poison, metadata !32, metadata !DIExpression()), !dbg !19
   tail call void @llvm.dbg.value(metadata i32 1, metadata !33, metadata !DIExpression()), !dbg !19
 ;; Arglist with an argument, constant, local use before def, poison.
-; CHECK-NEXT: dbg.value(metadata !DIArgList(i32 %p, i32 0, i32 %0, i32 poison), metadata ![[f]], metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_LLVM_arg, 2, DW_OP_LLVM_arg, 3, DW_OP_plus, DW_OP_minus)), !dbg ![[dbg]]
 ; RECORDS-NEXT: dbg_value(!DIArgList(i32 %p, i32 0, i32 %0, i32 poison), ![[f]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_LLVM_arg, 2, DW_OP_LLVM_arg, 3, DW_OP_plus, DW_OP_minus), ![[dbg]])
   tail call void @llvm.dbg.value(metadata !DIArgList(i32 %p, i32 0, i32 %0, i32 poison), metadata !33, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_LLVM_arg, 2, DW_OP_LLVM_arg, 3, DW_OP_plus, DW_OP_minus)), !dbg !19
 ;; Check dbg.assign use before def (value, addr and ID). Check expression order too.
-; CHECK: dbg.assign(metadata i32 %0, metadata ![[i:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, 0),
-; CHECK-SAME:       metadata ![[ID:[0-9]+]], metadata ptr %a, metadata !DIExpression(DW_OP_plus_uconst, 1)), !dbg ![[dbg]]
 ; RECORDS: dbg_assign(i32 %0, ![[i:[0-9]+]], !DIExpression(DW_OP_plus_uconst, 0),
 ; RECORDS-SAME:       ![[ID:[0-9]+]], ptr %a, !DIExpression(DW_OP_plus_uconst, 1), ![[dbg]])
   tail call void @llvm.dbg.assign(metadata i32 %0, metadata !36, metadata !DIExpression(DW_OP_plus_uconst, 0), metadata !37, metadata ptr %a, metadata !DIExpression(DW_OP_plus_uconst, 1)), !dbg !19
   %a = alloca i32, align 4, !DIAssignID !37
 ; CHECK: %a = alloca i32, align 4, !DIAssignID ![[ID]]
 ;; Check dbg.declare configurations.
-; CHECK-NEXT: dbg.declare(metadata ptr %a, metadata ![[a:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.declare(metadata ![[empty:[0-9]+]], metadata ![[b:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.declare(metadata ptr poison, metadata ![[c:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.declare(metadata ptr null, metadata ![[d:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
-; CHECK-NEXT: dbg.declare(metadata ptr @g, metadata ![[h:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
 ; RECORDS: %a = alloca i32, align 4, !DIAssignID ![[ID]]
-;; Check dbg.declare configurations.
 ; RECORDS-NEXT: dbg_declare(ptr %a, ![[a:[0-9]+]], !DIExpression(), ![[dbg]])
 ; RECORDS-NEXT: dbg_declare(![[empty:[0-9]+]], ![[b:[0-9]+]], !DIExpression(), ![[dbg]])
 ; RECORDS-NEXT: dbg_declare(ptr poison, ![[c:[0-9]+]], !DIExpression(), ![[dbg]])
@@ -104,21 +57,17 @@ entry:
   tail call void @llvm.dbg.declare(metadata ptr null, metadata !31, metadata !DIExpression()), !dbg !19
   tail call void @llvm.dbg.declare(metadata ptr @g, metadata !35, metadata !DIExpression()), !dbg !19
 ;; Argument value dbg.declare.
-; CHECK: dbg.declare(metadata ptr %storage, metadata ![[g:[0-9]+]], metadata !DIExpression()), !dbg ![[dbg]]
 ; RECORDS: dbg_declare(ptr %storage, ![[g:[0-9]+]], !DIExpression(), ![[dbg]])
   tail call void @llvm.dbg.declare(metadata ptr %storage, metadata !34, metadata !DIExpression()), !dbg !19
 ;; Use before def dbg.value.
-; CHECK: dbg.value(metadata i32 %0, metadata ![[e]], metadata !DIExpression()), !dbg ![[dbg]]
 ; RECORDS: dbg_value(i32 %0, ![[e]], !DIExpression(), ![[dbg]])
   tail call void @llvm.dbg.value(metadata i32 %0, metadata !32, metadata !DIExpression()), !dbg !19
   %0 = load i32, ptr @g, align 4, !dbg !20
 ;; Non-argument local value dbg.value.
-; CHECK: dbg.value(metadata i32 %0, metadata ![[e]], metadata !DIExpression()), !dbg ![[dbg]]
 ; RECORDS: dbg_value(i32 %0, ![[e]], !DIExpression(), ![[dbg]])
   tail call void @llvm.dbg.value(metadata i32 %0, metadata !32, metadata !DIExpression()), !dbg !19
   store i32 %0, ptr %a, align 4, !dbg !19
   %1 = load i32, ptr %a, align 4, !dbg !25
-; CHECK: dbg.label(metadata ![[label:[0-9]+]]), !dbg ![[dbg]]
 ; RECORDS: dbg_label(![[label:[0-9]+]], ![[dbg]])
   tail call void @llvm.dbg.label(metadata !38), !dbg !19
   ret i32 %1, !dbg !27
diff --git a/llvm/test/Bitcode/upgrade-dbg-addr.ll b/llvm/test/Bitcode/upgrade-dbg-addr.ll
index 2c31fcd1e9c63..1fcf1efd5e5c0 100644
--- a/llvm/test/Bitcode/upgrade-dbg-addr.ll
+++ b/llvm/test/Bitcode/upgrade-dbg-addr.ll
@@ -1,21 +1,19 @@
 ; Test upgrade of dbg.addr intrinsics into dbg.value with DW_OP_deref appended
 ;
-; RUN: llvm-dis < %s.bc --write-experimental-debuginfo=false | FileCheck %s
-; RUN: llvm-dis < %s.bc --load-bitcode-into-experimental-debuginfo-iterators --write-experimental-debuginfo=false | FileCheck %s
+; RUN: llvm-dis < %s.bc | FileCheck %s
 ; RUN: verify-uselistorder < %s.bc
 
 define i32 @example(i32 %num) {
 entry:
   %num.addr = alloca i32, align 4
   store i32 %num, ptr %num.addr, align 4
-  ; CHECK-NOT: call void @llvm.dbg.addr
-  ; CHECK: call void @llvm.dbg.value(metadata ptr %num.addr, metadata ![[#]], metadata !DIExpression(DW_OP_deref))
+  ; CHECK-NOT: #dbg_addr
+  ; CHECK: #dbg_value(ptr %num.addr, ![[#]], !DIExpression(DW_OP_deref), ![[#]])
   call void @llvm.dbg.addr(metadata ptr %num.addr, metadata !16, metadata !DIExpression(DW_OP_plus_uconst, 0)), !dbg !17
   %0 = load i32, ptr %num.addr, align 4
   ret i32 %0
 }
 
-; CHECK: declare void @llvm.dbg.value(metadata, metadata, metadata)
 declare void @llvm.dbg.addr(metadata, metadata, metadata)
 
 !llvm.dbg.cu = !{!0}
diff --git a/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir b/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
index 77a4d65cb66b5..663c13af5e9df 100644
--- a/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
+++ b/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
@@ -2,10 +2,6 @@
 # RUN: llc -run-pass=mir-debugify -debugify-level=locations -o - %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg.value %s
 # RUN: llc -run-pass=mir-debugify,mir-strip-debug,mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s
 # RUN: llc -run-pass=mir-debugify,mir-strip-debug -o - %s | FileCheck --check-prefix=STRIP %s
-# RUN: llc --experimental-debuginfo-iterators=false -run-pass=mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s
-# RUN: llc --experimental-debuginfo-iterators=false -run-pass=mir-debugify -debugify-level=locations -o - %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg.value %s
-# RUN: llc --experimental-debuginfo-iterators=false -run-pass=mir-debugify,mir-strip-debug,mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s
-# RUN: llc --experimental-debuginfo-iterators=false -run-pass=mir-debugify,mir-strip-debug -o - %s | FileCheck --check-prefix=STRIP %s
 
 --- |
   ; ModuleID = 'loc-only.ll'
diff --git a/llvm/test/DebugInfo/X86/undef-dbg-val.ll b/llvm/test/DebugInfo/X86/undef-dbg-val.ll
index 02b94d9112a51..dab466a44a20b 100644
--- a/llvm/test/DebugInfo/X86/undef-dbg-val.ll
+++ b/llvm/test/DebugInfo/X86/undef-dbg-val.ll
@@ -1,4 +1,4 @@
-; RUN:  opt -S -passes=globalopt --experimental-debuginfo-iterators=false <%s | FileCheck %s
+; RUN:  opt -S -passes=globalopt <%s | FileCheck %s
 ; CHECK: #dbg_value(ptr poison,
 ; CHECK-SAME:    [[VAR:![0-9]+]],
 ; CHECK-SAME:    !DIExpression()
diff --git a/llvm/test/DebugInfo/roundtrip-non-instruction-debug-info.ll b/llvm/test/DebugInfo/roundtrip-non-instruction-debug-info.ll
deleted file mode 100644
index 32b37fa98f2f1..0000000000000
--- a/llvm/test/DebugInfo/roundtrip-non-instruction-debug-info.ll
+++ /dev/null
@@ -1,102 +0,0 @@
-;; Test that we can write in the old debug info format.
-; RUN: opt --passes=verify -S --write-experimental-debuginfo=false < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-;; Test that we can write in the new debug info format...
-; RUN: opt --passes=verify -S --write-experimental-debuginfo=true < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,NEWDBG --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-;; ...and then read the new format and write the old format.
-; RUN: opt --passes=verify -S --write-experimental-debuginfo=true < %s \
-; RUN:   | opt --passes=verify -S --write-experimental-debuginfo=false \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG  --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-;; Test also that the new flag is independent of the flag that enables use of
-;; these non-instruction debug info during LLVM passes.
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators --write-experimental-debuginfo=false < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-; RUN: opt --passes=verify -S --experimental-debuginfo-iterators --write-experimental-debuginfo=true < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,NEWDBG --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-;; Test that the preserving flag overrides the write flag.
-; RUN: opt --passes=verify -S --preserve-input-debuginfo-format=true --write-experimental-debuginfo=true < %s \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,OLDDBG  --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-; RUN: opt --passes=verify -S --write-experimental-debuginfo=true < %s \
-; RUN:   | opt --passes=verify -S --preserve-input-debuginfo-format=true --write-experimental-debuginfo=false \
-; RUN:   | FileCheck %s --check-prefixes=CHECK,NEWDBG  --implicit-check-not=llvm.dbg --implicit-check-not=#dbg
-
-; CHECK: @f(i32 %[[VAL_A:[0-9a-zA-Z]+]])
-; CHECK-NEXT: entry:
-; OLDDBG-NEXT: call void @llvm.dbg.value(metadata i32 %[[VAL_A]], metadata ![[VAR_A:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC_1:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_value(i32 %[[VAL_A]], ![[VAR_A:[0-9]+]], !DIExpression(), ![[LOC_1:[0-9]+]])
-; CHECK-NEXT: {{^}}  %[[VAL_B:[0-9a-zA-Z]+]] = alloca
-; OLDDBG-NEXT: call void @llvm.dbg.declare(metadata ptr %[[VAL_B]], metadata ![[VAR_B:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC_2:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_declare(ptr %[[VAL_B]], ![[VAR_B:[0-9]+]], !DIExpression(), ![[LOC_2:[0-9]+]])
-; CHECK-NEXT: {{^}}  %[[VAL_ADD:[0-9a-zA-Z]+]] = add i32 %[[VAL_A]], 5
-; OLDDBG-NEXT: call void @llvm.dbg.value(metadata !DIArgList(i32 %[[VAL_A]], i32 %[[VAL_ADD]]), metadata ![[VAR_A]], metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg ![[LOC_3:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_value(!DIArgList(i32 %[[VAL_A]], i32 %[[VAL_ADD]]), ![[VAR_A]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus), ![[LOC_3:[0-9]+]])
-; OLDDBG-NEXT: call void @llvm.dbg.label(metadata ![[LABEL_ID:[0-9]+]]), !dbg ![[LOC_3]]
-; NEWDBG-NEXT: {{^}}    #dbg_label(![[LABEL_ID:[0-9]+]], ![[LOC_3]])
-; CHECK-NEXT: {{^}}  store i32 %[[VAL_ADD]]{{.+}}, !DIAssignID ![[ASSIGNID:[0-9]+]]
-; OLDDBG-NEXT: call void @llvm.dbg.assign(metadata i32 %[[VAL_ADD]], metadata ![[VAR_B]], metadata !DIExpression(), metadata ![[ASSIGNID]], metadata ptr %[[VAL_B]], metadata !DIExpression()), !dbg ![[LOC_4:[0-9]+]]
-; NEWDBG-NEXT: {{^}}    #dbg_assign(i32 %[[VAL_ADD]], ![[VAR_B]], !DIExpression(), ![[ASSIGNID]], ptr %[[VAL_B]], !DIExpression(), ![[LOC_4:[0-9]+]])
-; CHECK-NEXT: {{^}}  ret i32
-
-; OLDDBG-DAG: declare void @llvm.dbg.value
-; OLDDBG-DAG: declare void @llvm.dbg.declare
-; OLDDBG-DAG: declare void @llvm.dbg.assign
-; OLDDBG-DAG: declare void @llvm.dbg.label
-
-; CHECK-DAG: llvm.dbg.cu
-; CHECK-DAG: ![[VAR_A]] = !DILocalVariable(name: "a"
-; CHECK-DAG: ![[VAR_B]] = !DILocalVariable(name: "b"
-; CHECK-DAG: ![[LOC_1]] = !DILocation(line: 3, column: 15
-; CHECK-DAG: ![[LOC_2]] = !DILocation(line: 3, column: 20
-; CHECK-DAG: ![[LOC_3]] = !DILocation(line: 3, column: 25
-; CHECK-DAG: ![[LOC_4]] = !DILocation(line: 3, column: 30
-; CHECK-DAG: ![[LABEL_ID]] = !DILabel(
-
-define dso_local i32 @f(i32 %a) !dbg !7 {
-entry:
-  call void @llvm.dbg.value(metadata i32 %a, metadata !20, metadata !DIExpression()), !dbg !30
-  %b = alloca i32, !dbg !30, !DIAssignID !40
-  call void @llvm.dbg.declare(metadata ptr %b, metadata !21, metadata !DIExpression()), !dbg !31
-  %add = add i32 %a, 5, !dbg !31
-  call void @llvm.dbg.value(metadata !DIArgList(i32 %a, i32 %add), metadata !20, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg !32
-  call void @llvm.dbg.label(metadata !50), !dbg !32
-  store i32 %add, ptr %b, !dbg !32, !DIAssignID !40
-  call void @llvm.dbg.assign(metadata i32 %add, metadata !21, metadata !DIExpression(), metadata !40, metadata ptr %b, metadata !DIExpression()), !dbg !33
-  ret i32 %add, !dbg !33
-
-}
-
-declare void @llvm.dbg.value(metadata, metadata, metadata)
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-declare void @llvm.dbg.label(metadata)
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 18.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
-!1 = !DIFile(filename: "print.c", directory: "/tmp")
-!2 = !{}
-!3 = !{i32 2, !"Dwarf Version", i32 5}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 18.0.0"}
-!7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !13)
-!8 = !DISubroutineType(types: !9)
-!9 = !{!12, !12}
-!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!13 = !{!20, !21}
-!20 = !DILocalVariable(name: "a", arg: 1, scope: !7, file: !1, line: 3, type: !12)
-!21 = !DILocalVariable(name: "b", scope: !7, file: !1, line: 3, type: !12)
-!30 = !DILocation(line: 3, column: 15, scope: !7)
-!31 = !DILocation(line: 3, column: 20, scope: !7)
-!32 = !DILocation(line: 3, column: 25, scope: !7)
-!33 = !DILocation(line: 3, column: 30, scope: !7)
-!40 = distinct !DIAssignID()
-!50 = !DILabel(scope: !7, name: "label", file: !1, line: 3)
diff --git a/llvm/test/DebugInfo/salvage-cast-debug-info.ll b/llvm/test/DebugInfo/salvage-cast-debug-info.ll
index 747ad45e7dc1e..e11c9d3ee19d2 100644
--- a/llvm/test/DebugInfo/salvage-cast-debug-info.ll
+++ b/llvm/test/DebugInfo/salvage-cast-debug-info.ll
@@ -1,5 +1,4 @@
 ; RUN: opt %s -passes=debugify,early-cse -earlycse-debug-hash -S | FileCheck %s
-; RUN: opt --experimental-debuginfo-iterators=false %s -passes=debugify,early-cse -earlycse-debug-hash -S | FileCheck %s
 define i32 @foo(i64 %nose, i32 %more) {
 ; CHECK-LABEL: @foo(
 ; CHECK: #dbg_value(i64 %nose, [[V1:![0-9]+]], !DIExpression(DW_OP_LLVM_convert, 64, DW_ATE_unsigned, DW_OP_LLVM_convert, 32, DW_ATE_unsigned
diff --git a/llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll b/llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll
index 9faa71e0a0682..9bae10081c48d 100644
--- a/llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll
+++ b/llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll
@@ -1,9 +1,4 @@
-; RUN: opt -S < %s -passes=globalopt --experimental-debuginfo-iterators=false | FileCheck %s
-;; FIXME: this test is pinned to not use RemoveDIs non-intrinsic debug-info.
-;; Constant-deletion takes a slightly different path and (correctly) replaces
-;; the operand of the debug-info record with poison instead of a null pointer.
-;; This is a spurious test difference that we'll suppress for turning RemoveDIs
-;; on.
+; RUN: opt -S < %s -passes=globalopt | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
@@ -16,7 +11,7 @@ define i32 @main(i32 %argc, ptr %argv) norecurse !dbg !18 {
 ; CHECK: alloca ptr
 ; Make sure the metadata is sane. Currently, we just drop the metadata,
 ; so it points to nothing.
-; CHECK: #dbg_value(!2,
+; CHECK: #dbg_value(ptr poison,
 ; CHECK: !2 = !{}
 entry:
   call void @llvm.dbg.value(metadata i32 %argc, metadata !22, metadata !23), !dbg !24
diff --git a/llvm/test/Transforms/Scalarizer/dbginfo.ll b/llvm/test/Transforms/Scalarizer/dbginfo.ll
index c388805fa6a2e..464e752054d2c 100644
--- a/llvm/test/Transforms/Scalarizer/dbginfo.ll
+++ b/llvm/test/Transforms/Scalarizer/dbginfo.ll
@@ -1,13 +1,5 @@
-; RUN: opt %s -passes='function(scalarizer<load-store>)' -S --experimental-debuginfo-iterators=false | FileCheck %s
+; RUN: opt %s -passes='function(scalarizer<load-store>)' -S | FileCheck %s
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-; FIXME: the test output here changes if we use the RemoveDIs non-intrinsic
-; debug-info format for the test. Specifically, the intrinsics no longer
-; interfere with the scalarizer, and we get the same code with/without
-; debug-info.
-; That's the behaviour we want; but fix this test to only use intrinsics as
-; we introduce the non-intrinsic format, to reduce the amount of spurious test
-; changes it comes with. We can turn that off once we're committed to using
-; the non-intrinsic format.
 
 ; Function Attrs: nounwind uwtable
 define void @f1(ptr nocapture %a, ptr nocapture readonly %b, ptr nocapture readonly %c) #0 !dbg !4 {
@@ -18,15 +10,15 @@ define void @f1(ptr nocapture %a, ptr nocapture readonly %b, ptr nocapture reado
 ; CHECK: %c.i1 = getelementptr i32, ptr %c, i32 1
 ; CHECK: %c.i2 = getelementptr i32, ptr %c, i32 2
 ; CHECK: %c.i3 = getelementptr i32, ptr %c, i32 3
-; CHECK: %b.i1 = getelementptr i32, ptr %b, i32 1
-; CHECK: %b.i2 = getelementptr i32, ptr %b, i32 2
-; CHECK: %b.i3 = getelementptr i32, ptr %b, i32 3
 ; CHECK: #dbg_value(ptr %a, !{{[0-9]+}}, {{.*}},  !{{[0-9]+}}
 ; CHECK: #dbg_value(ptr %b, !{{[0-9]+}}, {{.*}},  !{{[0-9]+}}
 ; CHECK: #dbg_value(ptr %c, !{{[0-9]+}}, {{.*}},  !{{[0-9]+}}
 ; CHECK: %bval.i0 = load i32, ptr %b, align 16, !dbg ![[TAG1:[0-9]+]], !tbaa ![[TAG2:[0-9]+]]
+; CHECK: %b.i1 = getelementptr i32, ptr %b, i32 1
 ; CHECK: %bval.i1 = load i32, ptr %b.i1, align 4, !dbg ![[TAG1]], !tbaa ![[TAG2]]
+; CHECK: %b.i2 = getelementptr i32, ptr %b, i32 2
 ; CHECK: %bval.i2 = load i32, ptr %b.i2, align 8, !dbg ![[TAG1]], !tbaa ![[TAG2]]
+; CHECK: %b.i3 = getelementptr i32, ptr %b, i32 3
 ; CHECK: %bval.i3 = load i32, ptr %b.i3, align 4, !dbg ![[TAG1]], !tbaa ![[TAG2]]
 ; CHECK: %cval.i0 = load i32, ptr %c, align 16, !dbg ![[TAG1]], !tbaa ![[TAG2]]
 ; CHECK: %cval.i1 = load i32, ptr %c.i1, align 4, !dbg ![[TAG1]], !tbaa ![[TAG2]]
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll
deleted file mode 100644
index 24f89b684156f..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll
+++ /dev/null
@@ -1,175 +0,0 @@
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
deleted file mode 100644
index 936377e1ceee5..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
+++ /dev/null
@@ -1,245 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-; CHECK-LABEL: @foo(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8, !DIAssignID [[DIASSIGNID16:![0-9]+]]
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    tail call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID16]], metadata ptr [[A_ADDR]], metadata !DIExpression()), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META13]], metadata !DIExpression()), !dbg [[DBG17]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3:[0-9]+]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG23]], !tbaa [[TBAA24:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG22]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG26:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG28:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG29:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG30:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG31:![0-9]+]], !prof [[PROF32:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG33:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG34]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG34]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG36:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG34]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG37:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG37]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG37]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG33]], !llvm.loop [[LOOP38:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG40:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-; CHECK-LABEL: @bar(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META43:![0-9]+]], metadata !DIExpression()), !dbg [[DBG46:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG47:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG48:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG48]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG47]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG51:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG52:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG53:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG54:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG55:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG56:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG57:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG56]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG56]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG58:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG56]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG59]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG59]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG55]], !llvm.loop [[LOOP60:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG62:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected
deleted file mode 100644
index 880442b7b06f1..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected
+++ /dev/null
@@ -1,247 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-; CHECK-LABEL: define {{[^@]+}}@foo
-; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] !dbg [[DBG7:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8, !DIAssignID [[DIASSIGNID16:![0-9]+]]
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    tail call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID16]], metadata ptr [[A_ADDR]], metadata !DIExpression()), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT:    store ptr [[A]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META13]], metadata !DIExpression()), !dbg [[DBG17]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3:[0-9]+]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG23]], !tbaa [[TBAA24:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG22]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG26:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG28:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG29:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG30:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG31:![0-9]+]], !prof [[PROF32:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG33:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG34]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG34]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG36:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG34]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG37:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG37]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG37]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG33]], !llvm.loop [[LOOP38:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG40:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-; CHECK-LABEL: define {{[^@]+}}@bar
-; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0]] !dbg [[DBG41:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    store ptr [[A]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META43:![0-9]+]], metadata !DIExpression()), !dbg [[DBG46:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG47:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG48:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG48]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG47]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG51:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG52:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG53:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG54:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG55:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG56:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG57:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG56]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG56]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG58:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG56]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG59]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG59]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG55]], !llvm.loop [[LOOP60:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG62:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
deleted file mode 100644
index 84f31cf764957..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
+++ /dev/null
@@ -1,317 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-; CHECK-LABEL: define {{[^@]+}}@foo
-; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] !dbg [[DBG7:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8, !DIAssignID [[DIASSIGNID16:![0-9]+]]
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    tail call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID16]], metadata ptr [[A_ADDR]], metadata !DIExpression()), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT:    store ptr [[A]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META13]], metadata !DIExpression()), !dbg [[DBG17]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3:[0-9]+]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG23]], !tbaa [[TBAA24:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG22]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG26:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG28:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG29:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG30:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG31:![0-9]+]], !prof [[PROF32:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG33:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG34]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG34]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG36:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG34]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG37:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG37]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG37]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG33]], !llvm.loop [[LOOP38:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG40:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-; CHECK-LABEL: define {{[^@]+}}@bar
-; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0]] !dbg [[DBG41:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    store ptr [[A]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META43:![0-9]+]], metadata !DIExpression()), !dbg [[DBG46:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG47:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG48:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG48]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG47]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG51:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG52:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG53:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG54:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG55:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG56:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG57:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG56]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG56]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG58:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG56]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG59]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG59]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG55]], !llvm.loop [[LOOP60:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG62:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
-;.
-; CHECK: attributes #[[ATTR0]] = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
-; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
-; CHECK: attributes #[[ATTR3]] = { nounwind }
-;.
-; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]], splitDebugInlining: false, nameTableKind: None)
-; CHECK: [[META1]] = !DIFile(filename: "various_ir_values.c", directory: {{.*}})
-; CHECK: [[META2]] = !{}
-; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
-; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
-; CHECK: [[META5:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; CHECK: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
-; CHECK: [[DBG7]] = distinct !DISubprogram(name: "foo", scope: [[META1]], file: [[META1]], line: 1, type: [[META8:![0-9]+]], scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META12:![0-9]+]])
-; CHECK: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]])
-; CHECK: [[META9]] = !{null, [[META10:![0-9]+]]}
-; CHECK: [[META10]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META11:![0-9]+]], size: 64)
-; CHECK: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-; CHECK: [[META12]] = !{[[META13]], [[META14]]}
-; CHECK: [[META13]] = !DILocalVariable(name: "A", arg: 1, scope: [[DBG7]], file: [[META1]], line: 1, type: [[META10]])
-; CHECK: [[META14]] = !DILocalVariable(name: "i", scope: [[META15:![0-9]+]], file: [[META1]], line: 3, type: [[META11]])
-; CHECK: [[META15]] = distinct !DILexicalBlock(scope: [[DBG7]], file: [[META1]], line: 3, column: 3)
-; CHECK: [[DIASSIGNID16]] = distinct !DIAssignID()
-; CHECK: [[DBG17]] = !DILocation(line: 1, column: 15, scope: [[DBG7]])
-; CHECK: [[TBAA18]] = !{[[META19:![0-9]+]], [[META19]], i64 0}
-; CHECK: [[META19]] = !{!"any pointer", [[META20:![0-9]+]], i64 0}
-; CHECK: [[META20]] = !{!"omnipotent char", [[META21:![0-9]+]], i64 0}
-; CHECK: [[META21]] = !{!"Simple C/C++ TBAA"}
-; CHECK: [[DBG22]] = !DILocation(line: 3, column: 8, scope: [[META15]])
-; CHECK: [[DBG23]] = !DILocation(line: 3, column: 12, scope: [[META15]])
-; CHECK: [[TBAA24]] = !{[[META25:![0-9]+]], [[META25]], i64 0}
-; CHECK: [[META25]] = !{!"int", [[META20]], i64 0}
-; CHECK: [[DBG26]] = !DILocation(line: 3, column: 19, scope: [[META27:![0-9]+]])
-; CHECK: [[META27]] = distinct !DILexicalBlock(scope: [[META15]], file: [[META1]], line: 3, column: 3)
-; CHECK: [[DBG28]] = !DILocation(line: 3, column: 24, scope: [[META27]])
-; CHECK: [[DBG29]] = !DILocation(line: 3, column: 23, scope: [[META27]])
-; CHECK: [[DBG30]] = !DILocation(line: 3, column: 21, scope: [[META27]])
-; CHECK: [[DBG31]] = !DILocation(line: 3, column: 3, scope: [[META15]])
-; CHECK: [[PROF32]] = !{!"branch_weights", i32 1, i32 1048575}
-; CHECK: [[DBG33]] = !DILocation(line: 3, column: 3, scope: [[META27]])
-; CHECK: [[DBG34]] = !DILocation(line: 4, column: 5, scope: [[META27]])
-; CHECK: [[DBG35]] = !DILocation(line: 4, column: 7, scope: [[META27]])
-; CHECK: [[DBG36]] = !DILocation(line: 4, column: 10, scope: [[META27]])
-; CHECK: [[DBG37]] = !DILocation(line: 3, column: 27, scope: [[META27]])
-; CHECK: [[LOOP38]] = distinct !{[[LOOP38]], [[DBG31]], [[META39:![0-9]+]]}
-; CHECK: [[META39]] = !DILocation(line: 4, column: 12, scope: [[META15]])
-; CHECK: [[DBG40]] = !DILocation(line: 5, column: 1, scope: [[DBG7]])
-; CHECK: [[DBG41]] = distinct !DISubprogram(name: "bar", scope: [[META1]], file: [[META1]], line: 7, type: [[META8]], scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META42:![0-9]+]])
-; CHECK: [[META42]] = !{[[META43]], [[META44]]}
-; CHECK: [[META43]] = !DILocalVariable(name: "A", arg: 1, scope: [[DBG41]], file: [[META1]], line: 7, type: [[META10]])
-; CHECK: [[META44]] = !DILocalVariable(name: "i", scope: [[META45:![0-9]+]], file: [[META1]], line: 9, type: [[META11]])
-; CHECK: [[META45]] = distinct !DILexicalBlock(scope: [[DBG41]], file: [[META1]], line: 9, column: 3)
-; CHECK: [[DBG46]] = !DILocation(line: 7, column: 15, scope: [[DBG41]])
-; CHECK: [[DBG47]] = !DILocation(line: 9, column: 8, scope: [[META45]])
-; CHECK: [[DBG48]] = !DILocation(line: 9, column: 12, scope: [[META45]])
-; CHECK: [[DBG49]] = !DILocation(line: 9, column: 19, scope: [[META50:![0-9]+]])
-; CHECK: [[META50]] = distinct !DILexicalBlock(scope: [[META45]], file: [[META1]], line: 9, column: 3)
-; CHECK: [[DBG51]] = !DILocation(line: 9, column: 24, scope: [[META50]])
-; CHECK: [[DBG52]] = !DILocation(line: 9, column: 23, scope: [[META50]])
-; CHECK: [[DBG53]] = !DILocation(line: 9, column: 21, scope: [[META50]])
-; CHECK: [[DBG54]] = !DILocation(line: 9, column: 3, scope: [[META45]])
-; CHECK: [[DBG55]] = !DILocation(line: 9, column: 3, scope: [[META50]])
-; CHECK: [[DBG56]] = !DILocation(line: 10, column: 5, scope: [[META50]])
-; CHECK: [[DBG57]] = !DILocation(line: 10, column: 7, scope: [[META50]])
-; CHECK: [[DBG58]] = !DILocation(line: 10, column: 10, scope: [[META50]])
-; CHECK: [[DBG59]] = !DILocation(line: 9, column: 27, scope: [[META50]])
-; CHECK: [[LOOP60]] = distinct !{[[LOOP60]], [[DBG54]], [[META61:![0-9]+]]}
-; CHECK: [[META61]] = !DILocation(line: 10, column: 12, scope: [[META45]])
-; CHECK: [[DBG62]] = !DILocation(line: 11, column: 1, scope: [[DBG41]])
-;.
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.noglobals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.noglobals.expected
deleted file mode 100644
index 936377e1ceee5..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.noglobals.expected
+++ /dev/null
@@ -1,245 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-; CHECK-LABEL: @foo(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8, !DIAssignID [[DIASSIGNID16:![0-9]+]]
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    tail call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID16]], metadata ptr [[A_ADDR]], metadata !DIExpression()), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META13]], metadata !DIExpression()), !dbg [[DBG17]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3:[0-9]+]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG23]], !tbaa [[TBAA24:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG22]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG26:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG28:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG29:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG30:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG31:![0-9]+]], !prof [[PROF32:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG33:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG34]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG34]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG36:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG34]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG37:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG37]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG37]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG33]], !llvm.loop [[LOOP38:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG40:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-; CHECK-LABEL: @bar(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META43:![0-9]+]], metadata !DIExpression()), !dbg [[DBG46:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG47:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG48:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG48]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG47]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG51:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG52:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG53:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG54:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG55:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG56:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG57:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG56]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG56]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG58:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG56]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG59]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG59]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG55]], !llvm.loop [[LOOP60:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG62:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected
deleted file mode 100644
index 9464377d4016d..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected
+++ /dev/null
@@ -1,306 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals smart
-; Just run it through opt, no passes needed.
-; This tests debug intrinsics, so we must explicitly disable records.
-; RUN: opt < %s -S --write-experimental-debuginfo=false | FileCheck %s
-
-; ModuleID = 'various_ir_values.c'
-source_filename = "various_ir_values.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define dso_local void @foo(ptr %A) #0 !dbg !7 {
-; CHECK-LABEL: @foo(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8, !DIAssignID [[DIASSIGNID16:![0-9]+]]
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    tail call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID16]], metadata ptr [[A_ADDR]], metadata !DIExpression()), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META13]], metadata !DIExpression()), !dbg [[DBG17]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3:[0-9]+]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META14:![0-9]+]], metadata !DIExpression()), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG23]], !tbaa [[TBAA24:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG22]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG26:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG28:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG29:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG30:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG31:![0-9]+]], !prof [[PROF32:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG33:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG35:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG34]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG34]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG36:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG34]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG37:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG37]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG37]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG33]], !llvm.loop [[LOOP38:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG40:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8, !DIAssignID !62
-  %i = alloca i32, align 4
-  tail call void @llvm.dbg.assign(metadata i1 undef, metadata !13, metadata !DIExpression(), metadata !62, metadata ptr %A.addr, metadata !DIExpression()), !dbg !20
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !13, metadata !DIExpression()), !dbg !20
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !21
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !14, metadata !DIExpression()), !dbg !22
-  store i32 0, ptr %i, align 4, !dbg !22, !tbaa !23
-  br label %for.cond, !dbg !21
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !25, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !27, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !28, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !29
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !30, !prof !61
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !31
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !32, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !33, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !32
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !32
-  store i32 0, ptr %arrayidx, align 4, !dbg !34, !tbaa !23
-  br label %for.inc, !dbg !32
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !35, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !35
-  store i32 %inc, ptr %i, align 4, !dbg !35, !tbaa !23
-  br label %for.cond, !dbg !31, !llvm.loop !36
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !38
-}
-
-; Function Attrs: nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: argmemonly nounwind willreturn
-declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
-
-; Function Attrs: nounwind uwtable
-define dso_local void @bar(ptr %A) #0 !dbg !39 {
-; CHECK-LABEL: @bar(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca ptr, align 8
-; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    store ptr [[A:%.*]], ptr [[A_ADDR]], align 8, !tbaa [[TBAA18]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[A_ADDR]], metadata [[META43:![0-9]+]], metadata !DIExpression()), !dbg [[DBG46:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG47:![0-9]+]]
-; CHECK-NEXT:    tail call void @llvm.dbg.declare(metadata ptr [[I]], metadata [[META44:![0-9]+]], metadata !DIExpression()), !dbg [[DBG48:![0-9]+]]
-; CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !dbg [[DBG48]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND:%.*]], !dbg [[DBG47]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG49:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG51:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4, !dbg [[DBG52:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], [[TMP2]], !dbg [[DBG53:![0-9]+]]
-; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]], !dbg [[DBG54:![0-9]+]]
-; CHECK:       for.cond.cleanup:
-; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR3]], !dbg [[DBG55:![0-9]+]]
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[A_ADDR]], align 8, !dbg [[DBG56:![0-9]+]], !tbaa [[TBAA18]]
-; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG57:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64, !dbg [[DBG56]]
-; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP3]], i64 [[IDXPROM]], !dbg [[DBG56]]
-; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX]], align 4, !dbg [[DBG58:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_INC:%.*]], !dbg [[DBG56]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !dbg [[DBG59:![0-9]+]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP5]], 1, !dbg [[DBG59]]
-; CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4, !dbg [[DBG59]], !tbaa [[TBAA24]]
-; CHECK-NEXT:    br label [[FOR_COND]], !dbg [[DBG55]], !llvm.loop [[LOOP60:![0-9]+]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void, !dbg [[DBG62:![0-9]+]]
-;
-entry:
-  %A.addr = alloca ptr, align 8
-  %i = alloca i32, align 4
-  store ptr %A, ptr %A.addr, align 8, !tbaa !16
-  tail call void @llvm.dbg.declare(metadata ptr %A.addr, metadata !41, metadata !DIExpression()), !dbg !44
-  call void @llvm.lifetime.start.p0(i64 4, ptr %i) #3, !dbg !45
-  tail call void @llvm.dbg.declare(metadata ptr %i, metadata !42, metadata !DIExpression()), !dbg !46
-  store i32 0, ptr %i, align 4, !dbg !46, !tbaa !23
-  br label %for.cond, !dbg !45
-
-for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, ptr %i, align 4, !dbg !47, !tbaa !23
-  %1 = load ptr, ptr %A.addr, align 8, !dbg !49, !tbaa !16
-  %2 = load i32, ptr %1, align 4, !dbg !50, !tbaa !23
-  %cmp = icmp slt i32 %0, %2, !dbg !51
-  br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !52
-
-for.cond.cleanup:                                 ; preds = %for.cond
-  call void @llvm.lifetime.end.p0(i64 4, ptr %i) #3, !dbg !53
-  br label %for.end
-
-for.body:                                         ; preds = %for.cond
-  %3 = load ptr, ptr %A.addr, align 8, !dbg !54, !tbaa !16
-  %4 = load i32, ptr %i, align 4, !dbg !55, !tbaa !23
-  %idxprom = sext i32 %4 to i64, !dbg !54
-  %arrayidx = getelementptr inbounds i32, ptr %3, i64 %idxprom, !dbg !54
-  store i32 0, ptr %arrayidx, align 4, !dbg !56, !tbaa !23
-  br label %for.inc, !dbg !54
-
-for.inc:                                          ; preds = %for.body
-  %5 = load i32, ptr %i, align 4, !dbg !57, !tbaa !23
-  %inc = add nsw i32 %5, 1, !dbg !57
-  store i32 %inc, ptr %i, align 4, !dbg !57, !tbaa !23
-  br label %for.cond, !dbg !53, !llvm.loop !58
-
-for.end:                                          ; preds = %for.cond.cleanup
-  ret void, !dbg !60
-}
-
-declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)
-
-attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="ieee,ieee" "denormal-fp-math-f32"="ieee,ieee" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { nounwind readnone speculatable willreturn }
-attributes #2 = { argmemonly nounwind willreturn }
-attributes #3 = { nounwind }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !4, !5}
-!llvm.ident = !{!6}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "various_ir_values.c", directory: "/data/build/llvm-project")
-!2 = !{}
-!3 = !{i32 7, !"Dwarf Version", i32 4}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 4}
-!6 = !{!"clang version 11.0.0 (git at github.com:llvm/llvm-project.git 1d5da8cd30fce1c0a2c2fa6ba656dbfaa36192c8)"}
-!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
-!8 = !DISubroutineType(types: !9)
-!9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64)
-!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !{!13, !14}
-!13 = !DILocalVariable(name: "A", arg: 1, scope: !7, file: !1, line: 1, type: !10)
-!14 = !DILocalVariable(name: "i", scope: !15, file: !1, line: 3, type: !11)
-!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 3, column: 3)
-!16 = !{!17, !17, i64 0}
-!17 = !{!"any pointer", !18, i64 0}
-!18 = !{!"omnipotent char", !19, i64 0}
-!19 = !{!"Simple C/C++ TBAA"}
-!20 = !DILocation(line: 1, column: 15, scope: !7)
-!21 = !DILocation(line: 3, column: 8, scope: !15)
-!22 = !DILocation(line: 3, column: 12, scope: !15)
-!23 = !{!24, !24, i64 0}
-!24 = !{!"int", !18, i64 0}
-!25 = !DILocation(line: 3, column: 19, scope: !26)
-!26 = distinct !DILexicalBlock(scope: !15, file: !1, line: 3, column: 3)
-!27 = !DILocation(line: 3, column: 24, scope: !26)
-!28 = !DILocation(line: 3, column: 23, scope: !26)
-!29 = !DILocation(line: 3, column: 21, scope: !26)
-!30 = !DILocation(line: 3, column: 3, scope: !15)
-!31 = !DILocation(line: 3, column: 3, scope: !26)
-!32 = !DILocation(line: 4, column: 5, scope: !26)
-!33 = !DILocation(line: 4, column: 7, scope: !26)
-!34 = !DILocation(line: 4, column: 10, scope: !26)
-!35 = !DILocation(line: 3, column: 27, scope: !26)
-!36 = distinct !{!36, !30, !37}
-!37 = !DILocation(line: 4, column: 12, scope: !15)
-!38 = !DILocation(line: 5, column: 1, scope: !7)
-!39 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !8, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !40)
-!40 = !{!41, !42}
-!41 = !DILocalVariable(name: "A", arg: 1, scope: !39, file: !1, line: 7, type: !10)
-!42 = !DILocalVariable(name: "i", scope: !43, file: !1, line: 9, type: !11)
-!43 = distinct !DILexicalBlock(scope: !39, file: !1, line: 9, column: 3)
-!44 = !DILocation(line: 7, column: 15, scope: !39)
-!45 = !DILocation(line: 9, column: 8, scope: !43)
-!46 = !DILocation(line: 9, column: 12, scope: !43)
-!47 = !DILocation(line: 9, column: 19, scope: !48)
-!48 = distinct !DILexicalBlock(scope: !43, file: !1, line: 9, column: 3)
-!49 = !DILocation(line: 9, column: 24, scope: !48)
-!50 = !DILocation(line: 9, column: 23, scope: !48)
-!51 = !DILocation(line: 9, column: 21, scope: !48)
-!52 = !DILocation(line: 9, column: 3, scope: !43)
-!53 = !DILocation(line: 9, column: 3, scope: !48)
-!54 = !DILocation(line: 10, column: 5, scope: !48)
-!55 = !DILocation(line: 10, column: 7, scope: !48)
-!56 = !DILocation(line: 10, column: 10, scope: !48)
-!57 = !DILocation(line: 9, column: 27, scope: !48)
-!58 = distinct !{!58, !52, !59}
-!59 = !DILocation(line: 10, column: 12, scope: !43)
-!60 = !DILocation(line: 11, column: 1, scope: !39)
-!61 = !{!"branch_weights", i32 1, i32 1048575}
-!62 = distinct !DIAssignID()
-;.
-; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]], splitDebugInlining: false, nameTableKind: None)
-; CHECK: [[META1]] = !DIFile(filename: "various_ir_values.c", directory: {{.*}})
-; CHECK: [[META2]] = !{}
-; CHECK: [[META7:![0-9]+]] = distinct !DISubprogram(name: "foo", scope: [[META1]], file: [[META1]], line: 1, type: [[META8:![0-9]+]], scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META12:![0-9]+]])
-; CHECK: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]])
-; CHECK: [[META9]] = !{null, [[META10:![0-9]+]]}
-; CHECK: [[META10]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META11:![0-9]+]], size: 64)
-; CHECK: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-; CHECK: [[META12]] = !{[[META13]], [[META14]]}
-; CHECK: [[META13]] = !DILocalVariable(name: "A", arg: 1, scope: [[META7]], file: [[META1]], line: 1, type: [[META10]])
-; CHECK: [[META14]] = !DILocalVariable(name: "i", scope: [[META15:![0-9]+]], file: [[META1]], line: 3, type: [[META11]])
-; CHECK: [[META15]] = distinct !DILexicalBlock(scope: [[META7]], file: [[META1]], line: 3, column: 3)
-; CHECK: [[DIASSIGNID16]] = distinct !DIAssignID()
-; CHECK: [[DBG17]] = !DILocation(line: 1, column: 15, scope: [[META7]])
-; CHECK: [[TBAA18]] = !{[[META19:![0-9]+]], [[META19]], i64 0}
-; CHECK: [[META19]] = !{!"any pointer", [[META20:![0-9]+]], i64 0}
-; CHECK: [[META20]] = !{!"omnipotent char", [[META21:![0-9]+]], i64 0}
-; CHECK: [[META21]] = !{!"Simple C/C++ TBAA"}
-; CHECK: [[DBG22]] = !DILocation(line: 3, column: 8, scope: [[META15]])
-; CHECK: [[DBG23]] = !DILocation(line: 3, column: 12, scope: [[META15]])
-; CHECK: [[TBAA24]] = !{[[META25:![0-9]+]], [[META25]], i64 0}
-; CHECK: [[META25]] = !{!"int", [[META20]], i64 0}
-; CHECK: [[DBG26]] = !DILocation(line: 3, column: 19, scope: [[META27:![0-9]+]])
-; CHECK: [[META27]] = distinct !DILexicalBlock(scope: [[META15]], file: [[META1]], line: 3, column: 3)
-; CHECK: [[DBG28]] = !DILocation(line: 3, column: 24, scope: [[META27]])
-; CHECK: [[DBG29]] = !DILocation(line: 3, column: 23, scope: [[META27]])
-; CHECK: [[DBG30]] = !DILocation(line: 3, column: 21, scope: [[META27]])
-; CHECK: [[DBG31]] = !DILocation(line: 3, column: 3, scope: [[META15]])
-; CHECK: [[PROF32]] = !{!"branch_weights", i32 1, i32 1048575}
-; CHECK: [[DBG33]] = !DILocation(line: 3, column: 3, scope: [[META27]])
-; CHECK: [[DBG34]] = !DILocation(line: 4, column: 5, scope: [[META27]])
-; CHECK: [[DBG35]] = !DILocation(line: 4, column: 7, scope: [[META27]])
-; CHECK: [[DBG36]] = !DILocation(line: 4, column: 10, scope: [[META27]])
-; CHECK: [[DBG37]] = !DILocation(line: 3, column: 27, scope: [[META27]])
-; CHECK: [[LOOP38]] = distinct !{[[LOOP38]], [[DBG31]], [[META39:![0-9]+]]}
-; CHECK: [[META39]] = !DILocation(line: 4, column: 12, scope: [[META15]])
-; CHECK: [[DBG40]] = !DILocation(line: 5, column: 1, scope: [[META7]])
-; CHECK: [[META41:![0-9]+]] = distinct !DISubprogram(name: "bar", scope: [[META1]], file: [[META1]], line: 7, type: [[META8]], scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META42:![0-9]+]])
-; CHECK: [[META42]] = !{[[META43]], [[META44]]}
-; CHECK: [[META43]] = !DILocalVariable(name: "A", arg: 1, scope: [[META41]], file: [[META1]], line: 7, type: [[META10]])
-; CHECK: [[META44]] = !DILocalVariable(name: "i", scope: [[META45:![0-9]+]], file: [[META1]], line: 9, type: [[META11]])
-; CHECK: [[META45]] = distinct !DILexicalBlock(scope: [[META41]], file: [[META1]], line: 9, column: 3)
-; CHECK: [[DBG46]] = !DILocation(line: 7, column: 15, scope: [[META41]])
-; CHECK: [[DBG47]] = !DILocation(line: 9, column: 8, scope: [[META45]])
-; CHECK: [[DBG48]] = !DILocation(line: 9, column: 12, scope: [[META45]])
-; CHECK: [[DBG49]] = !DILocation(line: 9, column: 19, scope: [[META50:![0-9]+]])
-; CHECK: [[META50]] = distinct !DILexicalBlock(scope: [[META45]], file: [[META1]], line: 9, column: 3)
-; CHECK: [[DBG51]] = !DILocation(line: 9, column: 24, scope: [[META50]])
-; CHECK: [[DBG52]] = !DILocation(line: 9, column: 23, scope: [[META50]])
-; CHECK: [[DBG53]] = !DILocation(line: 9, column: 21, scope: [[META50]])
-; CHECK: [[DBG54]] = !DILocation(line: 9, column: 3, scope: [[META45]])
-; CHECK: [[DBG55]] = !DILocation(line: 9, column: 3, scope: [[META50]])
-; CHECK: [[DBG56]] = !DILocation(line: 10, column: 5, scope: [[META50]])
-; CHECK: [[DBG57]] = !DILocation(line: 10, column: 7, scope: [[META50]])
-; CHECK: [[DBG58]] = !DILocation(line: 10, column: 10, scope: [[META50]])
-; CHECK: [[DBG59]] = !DILocation(line: 9, column: 27, scope: [[META50]])
-; CHECK: [[LOOP60]] = distinct !{[[LOOP60]], [[DBG54]], [[META61:![0-9]+]]}
-; CHECK: [[META61]] = !DILocation(line: 10, column: 12, scope: [[META45]])
-; CHECK: [[DBG62]] = !DILocation(line: 11, column: 1, scope: [[META41]])
-;.
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll
index 9a9cc0a06936f..96ff2d7ea5fed 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll
@@ -1,5 +1,5 @@
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.expected
index 1f9c37ccfbd88..c175409c3afb9 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.expected
index 5905e443deff2..870ed4d31acc6 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
index 579d6a437d0e5..82f1442f30166 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.noglobals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.noglobals.expected
index 1f9c37ccfbd88..c175409c3afb9 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.noglobals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.noglobals.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
index e2c426029a6b0..9addb55bda98d 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals smart
 ; Just run it through opt, no passes needed.
-; RUN: opt < %s -S --write-experimental-debuginfo=true | FileCheck %s
+; RUN: opt < %s -S | FileCheck %s
 
 ; ModuleID = 'various_ir_values.c'
 source_filename = "various_ir_values.c"
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test b/llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test
deleted file mode 100644
index c8483ffbafa2d..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test
+++ /dev/null
@@ -1,24 +0,0 @@
-## Basic test checking that update_test_checks.py works correctly on various "IR value" kinds
-# RUN: cp -f %S/Inputs/various_ir_values.ll %t.ll && %update_test_checks %t.ll
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.expected
-## Check that running the script again does not change the result:
-# RUN: %update_test_checks %t.ll
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.expected
-## Also try the --function-signature flag
-# RUN: %update_test_checks %t.ll --function-signature
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.expected
-## Verify that running without the --function-signature flag does not removes
-## the -SAME: lines since the generated file will have --function-signature in
-## an UTC_ARGS: comment in the first line (from the invocation above) which is
-## added to the update invocation below.
-# RUN: %update_test_checks %t.ll
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.expected
-## Also try the --check-globals flag
-# RUN: %update_test_checks %t.ll --check-globals
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.globals.expected
-# RUN: cp -f %S/Inputs/various_ir_values.ll %t.ll && %update_test_checks %t.ll --function-signature --check-globals all
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.globals.expected
-# RUN: cp -f %S/Inputs/various_ir_values.ll %t.ll && %update_test_checks %t.ll --check-globals none
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.noglobals.expected
-# RUN: cp -f %S/Inputs/various_ir_values.ll %t.ll && %update_test_checks %t.ll --check-globals smart
-# RUN: diff -u %t.ll %S/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected
diff --git a/llvm/test/tools/llvm-reduce/remove-dp-values.ll b/llvm/test/tools/llvm-reduce/remove-dp-values.ll
index ab9cff4ae7686..707f55ee8d3a4 100644
--- a/llvm/test/tools/llvm-reduce/remove-dp-values.ll
+++ b/llvm/test/tools/llvm-reduce/remove-dp-values.ll
@@ -1,10 +1,6 @@
 ; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
 ; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s --implicit-check-not=#dbg_value
 
-; RUN: opt < %s -S --write-experimental-debuginfo=false > %t.intrinsics.ll
-; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=INTRINSIC-INTERESTINGNESS --test-arg %s --test-arg --input-file %t.intrinsics.ll -o %t
-; RUN: FileCheck --check-prefixes=INTRINSIC-FINAL --input-file=%t %s --implicit-check-not=#dbg_value
-
 ; Test that we can, in RemoveDIs mode / DbgVariableRecords mode (where variable location
 ; information isn't an instruction), remove one variable location assignment
 ; but not another.
diff --git a/llvm/tools/llvm-as/llvm-as.cpp b/llvm/tools/llvm-as/llvm-as.cpp
index 1c29a7b671c46..081bcb6faa719 100644
--- a/llvm/tools/llvm-as/llvm-as.cpp
+++ b/llvm/tools/llvm-as/llvm-as.cpp
@@ -67,7 +67,6 @@ static cl::opt<std::string> ClDataLayout("data-layout",
                                          cl::value_desc("layout-string"),
                                          cl::init(""), cl::cat(AsCat));
 extern cl::opt<bool> UseNewDbgInfoFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
 
 static void WriteOutputFile(const Module *M, const ModuleSummaryIndex *Index) {
   // Infer the output filename if needed.
@@ -142,8 +141,7 @@ int main(int argc, char **argv) {
   }
 
   // Convert to new debug format if requested.
-  M->setIsNewDbgInfoFormat(UseNewDbgInfoFormat &&
-                           WriteNewDbgInfoFormatToBitcode);
+  M->setIsNewDbgInfoFormat(UseNewDbgInfoFormat);
   if (M->IsNewDbgInfoFormat)
     M->removeDebugIntrinsicDeclarations();
 
diff --git a/llvm/tools/llvm-dis/llvm-dis.cpp b/llvm/tools/llvm-dis/llvm-dis.cpp
index 49acc9cd456ff..8c1aaf6fd604b 100644
--- a/llvm/tools/llvm-dis/llvm-dis.cpp
+++ b/llvm/tools/llvm-dis/llvm-dis.cpp
@@ -96,9 +96,7 @@ static cl::opt<bool> PrintThinLTOIndexOnly(
     cl::desc("Only read thinlto index and print the index as LLVM assembly."),
     cl::init(false), cl::Hidden, cl::cat(DisCategory));
 
-extern cl::opt<bool> WriteNewDbgInfoFormat;
-
-extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
+extern cl::opt<bool> UseNewDbgInfoFormat;
 
 namespace {
 
@@ -187,10 +185,6 @@ int main(int argc, char **argv) {
   cl::HideUnrelatedOptions({&DisCategory, &getColorCategory()});
   cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .ll disassembler\n");
 
-  // Load bitcode into the new debug info format by default.
-  if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
-    LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
-
   if (InputFilenames.size() < 1) {
     InputFilenames.push_back("-");
   } else if (InputFilenames.size() > 1 && !OutputFilename.empty()) {
@@ -276,8 +270,8 @@ int main(int argc, char **argv) {
       // All that llvm-dis does is write the assembly to a file.
       if (!DontPrint) {
         if (M) {
-          M->setIsNewDbgInfoFormat(WriteNewDbgInfoFormat);
-          if (WriteNewDbgInfoFormat)
+          M->setIsNewDbgInfoFormat(UseNewDbgInfoFormat);
+          if (UseNewDbgInfoFormat)
             M->removeDebugIntrinsicDeclarations();
           M->print(Out->os(), Annotator.get(), PreserveAssemblyUseListOrder);
         }
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp
index f0bf9d69bd0d3..ac90c8dc23284 100644
--- a/llvm/tools/llvm-link/llvm-link.cpp
+++ b/llvm/tools/llvm-link/llvm-link.cpp
@@ -131,10 +131,6 @@ static cl::opt<bool> IgnoreNonBitcode(
 
 extern cl::opt<bool> UseNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
-extern cl::opt<bool> WriteNewDbgInfoFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
-
-extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
 
 static ExitOnError ExitOnErr;
 
@@ -483,10 +479,6 @@ int main(int argc, char **argv) {
   cl::HideUnrelatedOptions({&LinkCategory, &getColorCategory()});
   cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
 
-  // Load bitcode into the new debug info format by default.
-  if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
-    LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
-
   // Since llvm-link collects multiple IR modules together, for simplicity's
   // sake we disable the "PreserveInputDbgFormat" flag to enforce a single
   // debug info format.
@@ -545,10 +537,10 @@ int main(int argc, char **argv) {
       Composite->removeDebugIntrinsicDeclarations();
   };
   if (OutputAssembly) {
-    SetFormat(WriteNewDbgInfoFormat);
+    SetFormat(UseNewDbgInfoFormat);
     Composite->print(Out.os(), nullptr, PreserveAssemblyUseListOrder);
   } else if (Force || !CheckBitcodeOutputToConsole(Out.os())) {
-    SetFormat(UseNewDbgInfoFormat && WriteNewDbgInfoFormatToBitcode);
+    SetFormat(UseNewDbgInfoFormat);
     WriteBitcodeToFile(*Composite, Out.os(), PreserveBitcodeUseListOrder);
   }
 
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index 0aa47e534855c..bcf106b37aae1 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -264,7 +264,6 @@ static cl::opt<bool>
     LTOSaveBeforeOpt("lto-save-before-opt", cl::init(false),
                      cl::desc("Save the IR before running optimizations"));
 
-extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
 
 namespace {
@@ -1001,9 +1000,6 @@ int main(int argc, char **argv) {
   InitLLVM X(argc, argv);
   cl::HideUnrelatedOptions({&LTOCategory, &getColorCategory()});
   cl::ParseCommandLineOptions(argc, argv, "llvm LTO linker\n");
-  // Load bitcode into the new debug info format by default.
-  if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
-    LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
 
   // Since llvm-lto collects multiple IR modules together, for simplicity's sake
   // we disable the "PreserveInputDbgFormat" flag to enforce a single debug info
diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp
index dbb7f2f3028aa..c50869056a1dd 100644
--- a/llvm/tools/llvm-lto2/llvm-lto2.cpp
+++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp
@@ -187,7 +187,6 @@ static cl::opt<bool> EnableFreestanding(
     cl::desc("Enable Freestanding (disable builtins / TLI) during LTO"),
     cl::Hidden);
 
-extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
 
 static void check(Error E, std::string Msg) {
@@ -224,9 +223,6 @@ static int usage() {
 
 static int run(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, "Resolution-based LTO test harness");
-  // Load bitcode into the new debug info format by default.
-  if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
-    LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
 
   // Since llvm-lto2 collects multiple IR modules together, for simplicity's
   // sake we disable the "PreserveInputDbgFormat" flag to enforce a single debug
diff --git a/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp b/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
index 24f4f11db9a8b..632fd7b0e1a32 100644
--- a/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
+++ b/llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
@@ -25,8 +25,7 @@ using namespace IRSimilarity;
 
 extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
-extern cl::opt<bool> WriteNewDbgInfoFormat;
+extern cl::opt<bool> UseNewDbgInfoFormat;
 
 static std::unique_ptr<Module> makeLLVMModule(LLVMContext &Context,
                                               StringRef ModuleStr) {
diff --git a/llvm/unittests/Transforms/Utils/LocalTest.cpp b/llvm/unittests/Transforms/Utils/LocalTest.cpp
index 3b3c45d969971..af06cfb5dfe68 100644
--- a/llvm/unittests/Transforms/Utils/LocalTest.cpp
+++ b/llvm/unittests/Transforms/Utils/LocalTest.cpp
@@ -30,8 +30,6 @@ using namespace llvm;
 
 extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
 extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
-extern bool WriteNewDbgInfoFormatToBitcode;
-extern cl::opt<bool> WriteNewDbgInfoFormat;
 
 // Backup all of the existing settings that may be modified when
 // PreserveInputDbgFormat=true, so that when the test is finished we return them
@@ -39,13 +37,9 @@ extern cl::opt<bool> WriteNewDbgInfoFormat;
 static auto SaveDbgInfoFormat() {
   return make_scope_exit(
       [OldPreserveInputDbgFormat = PreserveInputDbgFormat.getValue(),
-       OldUseNewDbgInfoFormat = UseNewDbgInfoFormat.getValue(),
-       OldWriteNewDbgInfoFormatToBitcode = WriteNewDbgInfoFormatToBitcode,
-       OldWriteNewDbgInfoFormat = WriteNewDbgInfoFormat.getValue()] {
+       OldUseNewDbgInfoFormat = UseNewDbgInfoFormat.getValue()] {
         PreserveInputDbgFormat = OldPreserveInputDbgFormat;
         UseNewDbgInfoFormat = OldUseNewDbgInfoFormat;
-        WriteNewDbgInfoFormatToBitcode = OldWriteNewDbgInfoFormatToBitcode;
-        WriteNewDbgInfoFormat = OldWriteNewDbgInfoFormat;
       });
 }
 

>From 7fdd1ba699277961f6a1945839f373cd7e2c0b28 Mon Sep 17 00:00:00 2001
From: Jeremy Morse <jeremy.morse at sony.com>
Date: Thu, 20 Mar 2025 15:13:57 +0000
Subject: [PATCH 2/4] Review feedback

---
 llvm/lib/IRPrinter/IRPrintingPasses.cpp       |  2 +-
 .../Bitcode/dbg-intrinsics-autoupgrade.ll     | 29 ++++++++++++++++++-
 .../tools/llvm-reduce/remove-dp-values.ll     |  3 --
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/llvm/lib/IRPrinter/IRPrintingPasses.cpp b/llvm/lib/IRPrinter/IRPrintingPasses.cpp
index e03e338c999e8..b1750a5ca3091 100644
--- a/llvm/lib/IRPrinter/IRPrintingPasses.cpp
+++ b/llvm/lib/IRPrinter/IRPrintingPasses.cpp
@@ -1,4 +1,4 @@
-//===--- iRPrintingPasses.cpp - Module and Function printing passes -------===//
+//===--- IRPrintingPasses.cpp - Module and Function printing passes -------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll b/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
index 862b2a9345ffc..d4d66b7c4fb02 100644
--- a/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
+++ b/llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
@@ -3,7 +3,12 @@
 ; RUN: opt --passes=verify %s.bc -o - -S \
 ; RUN:   | FileCheck %s --implicit-check-not=llvm.dbg
 
-;; Assembled with llvm-as ./brains.ll -o out.bc --write-experimental-debuginfo-iterators-to-bitcode=false
+;; While we're at it, test the textual IR autoupgrade path too.
+; RUN: opt --passes=verify %s -o - -S \
+; RUN:   | FileCheck %s --implicit-check-not=llvm.dbg
+
+;; Bitcode file was assembled with llvm-as ./brains.ll -o out.bc
+;; --write-experimental-debuginfo-iterators-to-bitcode=false
 ;; immediately before the latter flag was deleted.
 
 ; CHECK: @f(i32 %[[VAL_A:[0-9a-zA-Z]+]])
@@ -29,6 +34,28 @@
 ; CHECK-DAG: ![[LABEL_ID]] = !DILabel(
 ; CHECK-DAG: ![[EMPTY]] = !{}
 
+;; Also test that the bitcode file itself doesn't contain any debug records,
+;; and instead has function calls, the storage for intrinsics. This is to
+;; ensure we're actually testing the autoupgrade path from a bitcode file that
+;; definitely contains intrinsics.
+
+; RUN: llvm-bcanalyzer %s.bc --dump --disable-histogram | FileCheck %s --check-prefix=BITCODE --implicit-check-not=FUNCTION_BLOCK --implicit-check-not=DEBUG_RECORD
+
+; BITCODE-LABEL: <FUNCTION_BLOCK
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_ALLOCA
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_BINOP
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_STORE
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_CALL
+; BITCODE:       <INST_RET
+; BITCODE:       </FUNCTION_BLOCK>
+;; Summary text,
+; BITCODE:   Block ID #12 (FUNCTION_BLOCK):
+
 define dso_local i32 @f(i32 %a) !dbg !7 {
 entry:
   call void @llvm.dbg.value(metadata i32 %a, metadata !20, metadata !DIExpression()), !dbg !30
diff --git a/llvm/test/tools/llvm-reduce/remove-dp-values.ll b/llvm/test/tools/llvm-reduce/remove-dp-values.ll
index 707f55ee8d3a4..7afb393375d99 100644
--- a/llvm/test/tools/llvm-reduce/remove-dp-values.ll
+++ b/llvm/test/tools/llvm-reduce/remove-dp-values.ll
@@ -6,12 +6,9 @@
 ; but not another.
 
 ; CHECK-INTERESTINGNESS:     #dbg_value(i32 %added,
-; INTRINSIC-INTERESTINGNESS: llvm.dbg.value(metadata i32 %added,
 
 ; CHECK-FINAL:      %added = add
 ; CHECK-FINAL-NEXT: #dbg_value(i32 %added,
-; INTRINSIC-FINAL:      %added = add
-; INTRINSIC-FINAL-NEXT: llvm.dbg.value(metadata i32 %added,
 
 define i32 @main() !dbg !7 {
 entry:

>From cb8788e21af8992d1278e66f91550f8406c41ec2 Mon Sep 17 00:00:00 2001
From: Jeremy Morse <jeremy.morse at sony.com>
Date: Thu, 20 Mar 2025 16:50:47 +0000
Subject: [PATCH 3/4] Make mlir work with removed debug-info flags

---
 mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp          |  9 +--------
 mlir/test/Target/LLVMIR/llvmir-debug.mlir           | 13 +------------
 .../lib/Dialect/Test/TestToLLVMIRTranslation.cpp    | 10 +---------
 3 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
index 92e786b130abb..34d20bea4be9e 100644
--- a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
+++ b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
@@ -20,7 +20,6 @@
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 
-extern llvm::cl::opt<bool> WriteNewDbgInfoFormat;
 
 using namespace mlir;
 
@@ -34,13 +33,7 @@ void registerToLLVMIRTranslation() {
         if (!llvmModule)
           return failure();
 
-        // When printing LLVM IR, we should convert the module to the debug info
-        // format that LLVM expects us to print.
-        // See https://llvm.org/docs/RemoveDIsDebugInfo.html
-        llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule,
-                                                     WriteNewDbgInfoFormat);
-        if (WriteNewDbgInfoFormat)
-          llvmModule->removeDebugIntrinsicDeclarations();
+        llvmModule->removeDebugIntrinsicDeclarations();
         llvmModule->print(output, nullptr);
         return success();
       },
diff --git a/mlir/test/Target/LLVMIR/llvmir-debug.mlir b/mlir/test/Target/LLVMIR/llvmir-debug.mlir
index ab39a29515cc2..274d64af78283 100644
--- a/mlir/test/Target/LLVMIR/llvmir-debug.mlir
+++ b/mlir/test/Target/LLVMIR/llvmir-debug.mlir
@@ -1,5 +1,4 @@
-// RUN: mlir-translate -mlir-to-llvmir --write-experimental-debuginfo=false --split-input-file %s | FileCheck %s --check-prefixes=CHECK,INTRINSICS
-// RUN: mlir-translate -mlir-to-llvmir --write-experimental-debuginfo=true --split-input-file %s | FileCheck %s --check-prefixes=CHECK,RECORDS
+// RUN: mlir-translate -mlir-to-llvmir --split-input-file %s | FileCheck %s --check-prefixes=CHECK,RECORDS
 
 // CHECK-LABEL: define void @func_with_empty_named_info()
 // Check that translation doens't crash in the presence of an inlineble call
@@ -100,15 +99,12 @@ llvm.func @func_with_debug(%arg: i64) {
   %allocCount = llvm.mlir.constant(1 : i32) : i32
   %alloc = llvm.alloca %allocCount x i64 : (i32) -> !llvm.ptr
 
-  // INTRINSICS: call void @llvm.dbg.value(metadata i64 %[[ARG]], metadata ![[VAR_LOC:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 1))
   // RECORDS: #dbg_value(i64 %[[ARG]], ![[VAR_LOC:[0-9]+]], !DIExpression(DW_OP_LLVM_fragment, 0, 1), !{{.*}})
   llvm.intr.dbg.value #variable #llvm.di_expression<[DW_OP_LLVM_fragment(0, 1)]> = %arg : i64
 
-  // INTRINSICS: call void @llvm.dbg.declare(metadata ptr %[[ALLOC]], metadata ![[ADDR_LOC:[0-9]+]], metadata !DIExpression(DW_OP_deref, DW_OP_LLVM_convert, 4, DW_ATE_signed))
   // RECORDS: #dbg_declare(ptr %[[ALLOC]], ![[ADDR_LOC:[0-9]+]], !DIExpression(DW_OP_deref, DW_OP_LLVM_convert, 4, DW_ATE_signed), !{{.*}})
   llvm.intr.dbg.declare #variableAddr #llvm.di_expression<[DW_OP_deref, DW_OP_LLVM_convert(4, DW_ATE_signed)]> = %alloc : !llvm.ptr
 
-  // INTRINSICS: call void @llvm.dbg.value(metadata i64 %[[ARG]], metadata ![[NO_NAME_VAR:[0-9]+]], metadata !DIExpression())
   // RECORDS: #dbg_value(i64 %[[ARG]], ![[NO_NAME_VAR:[0-9]+]], !DIExpression(), !{{.*}})
   llvm.intr.dbg.value #noNameVariable = %arg : i64
 
@@ -230,13 +226,10 @@ llvm.func @func_decl_with_subprogram() -> (i32) loc(fused<#di_subprogram>["foo.m
 // CHECK-LABEL: define i32 @func_with_inlined_dbg_value(
 // CHECK-SAME: i32 %[[ARG:.*]]) !dbg ![[OUTER_FUNC:[0-9]+]]
 llvm.func @func_with_inlined_dbg_value(%arg0: i32) -> (i32) {
-  // INTRINSICS: call void @llvm.dbg.value(metadata i32 %[[ARG]], metadata ![[VAR_LOC0:[0-9]+]], metadata !DIExpression()), !dbg ![[DBG_LOC0:.*]]
   // RECORDS: #dbg_value(i32 %[[ARG]], ![[VAR_LOC0:[0-9]+]], !DIExpression(), ![[DBG_LOC0:.*]])
   llvm.intr.dbg.value #di_local_variable0 = %arg0 : i32 loc(fused<#di_subprogram>[#loc0])
-  // INTRINSICS: call void @llvm.dbg.value(metadata i32 %[[ARG]], metadata ![[VAR_LOC1:[0-9]+]], metadata !DIExpression()), !dbg ![[DBG_LOC1:.*]]
   // RECORDS: #dbg_value(i32 %[[ARG]], ![[VAR_LOC1:[0-9]+]], !DIExpression(), ![[DBG_LOC1:.*]])
   llvm.intr.dbg.value #di_local_variable1 = %arg0 : i32 loc(#loc1)
-  // INTRINSICS: call void @llvm.dbg.label(metadata ![[LABEL:[0-9]+]]), !dbg ![[DBG_LOC1:.*]]
   // RECORDS: #dbg_label(![[LABEL:[0-9]+]], ![[DBG_LOC1:.*]])
   llvm.intr.dbg.label #di_label loc(#loc1)
   llvm.return %arg0 : i32
@@ -268,7 +261,6 @@ llvm.func @func_with_inlined_dbg_value(%arg0: i32) -> (i32) {
 // CHECK-LABEL: define void @func_without_subprogram(
 // CHECK-SAME: i32 %[[ARG:.*]])
 llvm.func @func_without_subprogram(%0 : i32) {
-  // INTRINSICS: call void @llvm.dbg.value(metadata i32 %[[ARG]], metadata ![[VAR_LOC:[0-9]+]], metadata !DIExpression()), !dbg ![[DBG_LOC0:.*]]
   // RECORDS: #dbg_value(i32 %[[ARG]], ![[VAR_LOC:[0-9]+]], !DIExpression(), ![[DBG_LOC0:.*]])
   llvm.intr.dbg.value #di_local_variable = %0 : i32 loc(fused<#di_subprogram>[#loc])
   llvm.return
@@ -300,13 +292,10 @@ llvm.func @func_without_subprogram(%0 : i32) {
 llvm.func @dbg_intrinsics_with_no_location(%arg0: i32) -> (i32) {
   %allocCount = llvm.mlir.constant(1 : i32) : i32
   %alloc = llvm.alloca %allocCount x i64 : (i32) -> !llvm.ptr
-  // INTRINSICS-NOT: @llvm.dbg.value
   // RECORDS-NOT: #dbg_value
   llvm.intr.dbg.value #di_local_variable = %arg0 : i32
-  // INTRINSICS-NOT: @llvm.dbg.declare
   // RECORDS-NOT: #dbg_declare
   llvm.intr.dbg.declare #declared_var = %alloc : !llvm.ptr
-  // INTRINSICS-NOT: @llvm.dbg.label
   // RECORDS-NOT: #dbg_label
   llvm.intr.dbg.label #di_label
   llvm.return %arg0 : i32
diff --git a/mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp b/mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp
index 157c6265be834..103817df41d34 100644
--- a/mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp
+++ b/mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp
@@ -24,8 +24,6 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/IR/DebugProgramInstruction.h"
 
-extern llvm::cl::opt<bool> WriteNewDbgInfoFormat;
-
 using namespace mlir;
 
 namespace {
@@ -125,13 +123,7 @@ void registerTestToLLVMIR() {
         if (!llvmModule)
           return failure();
 
-        // When printing LLVM IR, we should convert the module to the debug info
-        // format that LLVM expects us to print.
-        // See https://llvm.org/docs/RemoveDIsDebugInfo.html
-        llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule,
-                                                     WriteNewDbgInfoFormat);
-        if (WriteNewDbgInfoFormat)
-          llvmModule->removeDebugIntrinsicDeclarations();
+        llvmModule->removeDebugIntrinsicDeclarations();
         llvmModule->print(output, nullptr);
         return success();
       },

>From ecd8132c12bdfeadf7430868aff990009296a28c Mon Sep 17 00:00:00 2001
From: Jeremy Morse <jeremy.morse at sony.com>
Date: Fri, 28 Mar 2025 16:09:54 +0000
Subject: [PATCH 4/4] Actually, just switch mlir to honouring RemoveDIs-mode

---
 mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
index 34d20bea4be9e..e3fa7c883c524 100644
--- a/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
+++ b/mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
@@ -20,6 +20,7 @@
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 
+extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
 
 using namespace mlir;
 
@@ -33,7 +34,13 @@ void registerToLLVMIRTranslation() {
         if (!llvmModule)
           return failure();
 
-        llvmModule->removeDebugIntrinsicDeclarations();
+        // When printing LLVM IR, we should convert the module to the debug info
+        // format that LLVM expects us to print.
+        // See https://llvm.org/docs/RemoveDIsDebugInfo.html
+        llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule,
+                                                     UseNewDbgInfoFormat);
+        if (UseNewDbgInfoFormat)
+          llvmModule->removeDebugIntrinsicDeclarations();
         llvmModule->print(output, nullptr);
         return success();
       },



More information about the Mlir-commits mailing list