[flang-commits] [clang-tools-extra] [clang] [compiler-rt] [flang] [llvm] [bpi] Reuse the AsmWriter's BB naming scheme (PR #73593)

Mircea Trofin via flang-commits flang-commits at lists.llvm.org
Fri Dec 1 14:36:29 PST 2023


https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/73593

>From 6467f87598c65984da35ed0f72b142935798b8ab Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Mon, 27 Nov 2023 16:03:03 -0800
Subject: [PATCH 1/3] [bpi] Reuse the AsmWriter's BB naming scheme

When using `BranchProbabilityPrinterPass`, if a BB has no name, we get
pretty unusable information like `edge -> has probability...` (i.e. no
idea what the vertices of that edge are).

This patch reuses the same naming sheme `Function::dump`. Especially
during debugging sessions, the IR obtained from a function and the names
used by BPPP will match.
---
 llvm/include/llvm/IR/BasicBlock.h             |  4 +--
 llvm/lib/Analysis/BranchProbabilityInfo.cpp   |  9 +++++--
 llvm/lib/IR/AsmWriter.cpp                     | 27 +++++++++++--------
 .../BranchProbabilityInfo/anonymous-bb.ll     | 25 +++++++++++++++++
 .../pointer_heuristics.ll                     | 24 ++++++++---------
 5 files changed, 62 insertions(+), 27 deletions(-)
 create mode 100644 llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll

diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index ec916acc25151c8..98ff865dba96974 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -420,8 +420,8 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
   /// Print the basic block to an output stream with an optional
   /// AssemblyAnnotationWriter.
   void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr,
-             bool ShouldPreserveUseListOrder = false,
-             bool IsForDebug = false) const;
+             bool ShouldPreserveUseListOrder = false, bool IsForDebug = false,
+             bool NameOnly = false) const;
 
   //===--------------------------------------------------------------------===//
   /// Instruction iterator methods
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index 9789a3e5364c3c6..04de2d2cebe4f3c 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -1188,8 +1188,13 @@ BranchProbabilityInfo::printEdgeProbability(raw_ostream &OS,
                                             const BasicBlock *Src,
                                             const BasicBlock *Dst) const {
   const BranchProbability Prob = getEdgeProbability(Src, Dst);
-  OS << "edge " << Src->getName() << " -> " << Dst->getName()
-     << " probability is " << Prob
+  OS << "edge ";
+  Src->print(OS, /*AAW=*/nullptr, /*ShouldPreserveUseListOrder=*/false,
+             /*IsForDebug=*/false, /*NameOnly=*/true);
+  OS << " -> ";
+  Dst->print(OS, /*AAW=*/nullptr, /*ShouldPreserveUseListOrder=*/false,
+             /*IsForDebug=*/false, /*NameOnly=*/true);
+  OS << " probability is " << Prob
      << (isEdgeHot(Src, Dst) ? " [HOT edge]\n" : "\n");
 
   return OS;
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 601b636f306adeb..9b14ad974139783 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2624,7 +2624,7 @@ class AssemblyWriter {
   void printComdat(const Comdat *C);
   void printFunction(const Function *F);
   void printArgument(const Argument *FA, AttributeSet Attrs);
-  void printBasicBlock(const BasicBlock *BB);
+  void printBasicBlock(const BasicBlock *BB, bool NameOnly = false);
   void printInstructionLine(const Instruction &I);
   void printInstruction(const Instruction &I);
   void printDPMarker(const DPMarker &DPI);
@@ -3960,21 +3960,26 @@ void AssemblyWriter::printArgument(const Argument *Arg, AttributeSet Attrs) {
 }
 
 /// printBasicBlock - This member is called for each basic block in a method.
-void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
-  bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();
-  if (BB->hasName()) {              // Print out the label if it exists...
+void AssemblyWriter::printBasicBlock(const BasicBlock *BB, bool NameOnly) {
+  const bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();
+  const bool UnnamedEntry = !BB->hasName() && IsEntryBlock;
+  if (!NameOnly && !UnnamedEntry)
     Out << "\n";
+  if (BB->hasName()) { // Print out the label if it exists...
     PrintLLVMName(Out, BB->getName(), LabelPrefix);
-    Out << ':';
   } else if (!IsEntryBlock) {
-    Out << "\n";
     int Slot = Machine.getLocalSlot(BB);
     if (Slot != -1)
-      Out << Slot << ":";
+      Out << Slot;
     else
-      Out << "<badref>:";
+      Out << "<badref>";
   }
 
+  if (NameOnly)
+    return;
+  if (!UnnamedEntry)
+    Out << ":";
+
   if (!IsEntryBlock) {
     // Output predecessors for the block.
     Out.PadToColumn(50);
@@ -4658,14 +4663,14 @@ void Function::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
 }
 
 void BasicBlock::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
-                     bool ShouldPreserveUseListOrder,
-                     bool IsForDebug) const {
+                       bool ShouldPreserveUseListOrder, bool IsForDebug,
+                       bool NameOnly) const {
   SlotTracker SlotTable(this->getParent());
   formatted_raw_ostream OS(ROS);
   AssemblyWriter W(OS, SlotTable, this->getModule(), AAW,
                    IsForDebug,
                    ShouldPreserveUseListOrder);
-  W.printBasicBlock(this);
+  W.printBasicBlock(this, NameOnly);
 }
 
 void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
new file mode 100644
index 000000000000000..7ca97699dfba2b1
--- /dev/null
+++ b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
@@ -0,0 +1,25 @@
+; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
+
+define void @fct() {
+; CHECK: fct
+entry:
+  br label %0
+0:
+  br label %1
+1:
+  ret void
+}
+
+; CHECK: edge entry -> 0
+; CHECK: edge 0 -> 1
+
+define void @fct2() {
+; CHECK: fct2
+  br label %1
+1:
+  br label %2
+2:
+  ret void
+}
+; CHECK: edge  -> 1
+; CHECK: edge 1 -> 2
\ No newline at end of file
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll b/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
index 3c6798d31f9ba71..76a57de9ef82cdd 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
@@ -4,18 +4,18 @@ define i32 @cmp1(ptr readnone %0, ptr readnone %1) {
 ; CHECK-LABEL: 'cmp1'
   %3 = icmp eq ptr %0, %1
   br i1 %3, label %4, label %6
-; CHECK:   edge  ->  probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  ->  probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge  -> 4 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge  -> 6 probability is 0x50000000 / 0x80000000 = 62.50%
 
 4:                                                ; preds = %2
   %5 = tail call i32 @f() #2
   br label %8
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 4 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 6:                                                ; preds = %2
   %7 = tail call i32 @g() #2
   br label %8
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 6 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 8:                                                ; preds = %6, %4
   %9 = phi i32 [ %5, %4 ], [ %7, %6 ]
@@ -26,18 +26,18 @@ define i32 @cmp2(ptr readnone %0, ptr readnone %1) {
 ; CHECK-LABEL: 'cmp2'
   %3 = icmp eq ptr %0, %1
   br i1 %3, label %6, label %4
-; CHECK:   edge  ->  probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  ->  probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge  -> 6 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge  -> 4 probability is 0x50000000 / 0x80000000 = 62.50%
 
 4:                                                ; preds = %2
   %5 = tail call i32 @f() #2
   br label %8
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 4 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 6:                                                ; preds = %2
   %7 = tail call i32 @g() #2
   br label %8
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 6 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 8:                                                ; preds = %6, %4
   %9 = phi i32 [ %5, %4 ], [ %7, %6 ]
@@ -48,18 +48,18 @@ define i32 @cmp3(ptr readnone %0) {
 ; CHECK-LABEL: 'cmp3'
   %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
-; CHECK:   edge  ->  probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  ->  probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge  -> 3 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge  -> 5 probability is 0x50000000 / 0x80000000 = 62.50%
 
 3:                                                ; preds = %1
   %4 = tail call i32 @f() #2
   br label %7
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 3 -> 7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 5:                                                ; preds = %1
   %6 = tail call i32 @g() #2
   br label %7
-; CHECK:   edge  ->  probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge 5 -> 7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 7:                                                ; preds = %5, %3
   %8 = phi i32 [ %6, %5 ], [ %4, %3 ]

>From 8def105ddff5fcadbb4f5588e8c6282116d8e842 Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Fri, 1 Dec 2023 10:41:03 -0800
Subject: [PATCH 2/3] use `printAsOperand`

---
 llvm/include/llvm/IR/BasicBlock.h             |  4 +--
 llvm/lib/Analysis/BranchProbabilityInfo.cpp   |  6 ++---
 llvm/lib/IR/AsmWriter.cpp                     | 27 ++++++++-----------
 .../BranchProbabilityInfo/anonymous-bb.ll     | 12 ++++-----
 .../pointer_heuristics.ll                     | 24 ++++++++---------
 5 files changed, 33 insertions(+), 40 deletions(-)

diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 98ff865dba96974..ec916acc25151c8 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -420,8 +420,8 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
   /// Print the basic block to an output stream with an optional
   /// AssemblyAnnotationWriter.
   void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr,
-             bool ShouldPreserveUseListOrder = false, bool IsForDebug = false,
-             bool NameOnly = false) const;
+             bool ShouldPreserveUseListOrder = false,
+             bool IsForDebug = false) const;
 
   //===--------------------------------------------------------------------===//
   /// Instruction iterator methods
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index 04de2d2cebe4f3c..6448ed66dc51c87 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -1189,11 +1189,9 @@ BranchProbabilityInfo::printEdgeProbability(raw_ostream &OS,
                                             const BasicBlock *Dst) const {
   const BranchProbability Prob = getEdgeProbability(Src, Dst);
   OS << "edge ";
-  Src->print(OS, /*AAW=*/nullptr, /*ShouldPreserveUseListOrder=*/false,
-             /*IsForDebug=*/false, /*NameOnly=*/true);
+  Src->printAsOperand(OS, false, Src->getModule());
   OS << " -> ";
-  Dst->print(OS, /*AAW=*/nullptr, /*ShouldPreserveUseListOrder=*/false,
-             /*IsForDebug=*/false, /*NameOnly=*/true);
+  Dst->printAsOperand(OS, false, Dst->getModule());
   OS << " probability is " << Prob
      << (isEdgeHot(Src, Dst) ? " [HOT edge]\n" : "\n");
 
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 9b14ad974139783..601b636f306adeb 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2624,7 +2624,7 @@ class AssemblyWriter {
   void printComdat(const Comdat *C);
   void printFunction(const Function *F);
   void printArgument(const Argument *FA, AttributeSet Attrs);
-  void printBasicBlock(const BasicBlock *BB, bool NameOnly = false);
+  void printBasicBlock(const BasicBlock *BB);
   void printInstructionLine(const Instruction &I);
   void printInstruction(const Instruction &I);
   void printDPMarker(const DPMarker &DPI);
@@ -3960,26 +3960,21 @@ void AssemblyWriter::printArgument(const Argument *Arg, AttributeSet Attrs) {
 }
 
 /// printBasicBlock - This member is called for each basic block in a method.
-void AssemblyWriter::printBasicBlock(const BasicBlock *BB, bool NameOnly) {
-  const bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();
-  const bool UnnamedEntry = !BB->hasName() && IsEntryBlock;
-  if (!NameOnly && !UnnamedEntry)
+void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
+  bool IsEntryBlock = BB->getParent() && BB->isEntryBlock();
+  if (BB->hasName()) {              // Print out the label if it exists...
     Out << "\n";
-  if (BB->hasName()) { // Print out the label if it exists...
     PrintLLVMName(Out, BB->getName(), LabelPrefix);
+    Out << ':';
   } else if (!IsEntryBlock) {
+    Out << "\n";
     int Slot = Machine.getLocalSlot(BB);
     if (Slot != -1)
-      Out << Slot;
+      Out << Slot << ":";
     else
-      Out << "<badref>";
+      Out << "<badref>:";
   }
 
-  if (NameOnly)
-    return;
-  if (!UnnamedEntry)
-    Out << ":";
-
   if (!IsEntryBlock) {
     // Output predecessors for the block.
     Out.PadToColumn(50);
@@ -4663,14 +4658,14 @@ void Function::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
 }
 
 void BasicBlock::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
-                       bool ShouldPreserveUseListOrder, bool IsForDebug,
-                       bool NameOnly) const {
+                     bool ShouldPreserveUseListOrder,
+                     bool IsForDebug) const {
   SlotTracker SlotTable(this->getParent());
   formatted_raw_ostream OS(ROS);
   AssemblyWriter W(OS, SlotTable, this->getModule(), AAW,
                    IsForDebug,
                    ShouldPreserveUseListOrder);
-  W.printBasicBlock(this, NameOnly);
+  W.printBasicBlock(this);
 }
 
 void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
index 7ca97699dfba2b1..3a06cbcac83fd3f 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
@@ -1,7 +1,7 @@
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 define void @fct() {
-; CHECK: fct
+; CHECK-LABEL: fct
 entry:
   br label %0
 0:
@@ -10,16 +10,16 @@ entry:
   ret void
 }
 
-; CHECK: edge entry -> 0
-; CHECK: edge 0 -> 1
+; CHECK: edge %entry -> %0
+; CHECK: edge %0 -> %1
 
 define void @fct2() {
-; CHECK: fct2
+; CHECK-LABEL: fct2
   br label %1
 1:
   br label %2
 2:
   ret void
 }
-; CHECK: edge  -> 1
-; CHECK: edge 1 -> 2
\ No newline at end of file
+; CHECK: edge %0 -> %1
+; CHECK: edge %1 -> %2
\ No newline at end of file
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll b/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
index 76a57de9ef82cdd..466563e851214d4 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll
@@ -4,18 +4,18 @@ define i32 @cmp1(ptr readnone %0, ptr readnone %1) {
 ; CHECK-LABEL: 'cmp1'
   %3 = icmp eq ptr %0, %1
   br i1 %3, label %4, label %6
-; CHECK:   edge  -> 4 probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  -> 6 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge %2 -> %4 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge %2 -> %6 probability is 0x50000000 / 0x80000000 = 62.50%
 
 4:                                                ; preds = %2
   %5 = tail call i32 @f() #2
   br label %8
-; CHECK:   edge 4 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %4 -> %8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 6:                                                ; preds = %2
   %7 = tail call i32 @g() #2
   br label %8
-; CHECK:   edge 6 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %6 -> %8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 8:                                                ; preds = %6, %4
   %9 = phi i32 [ %5, %4 ], [ %7, %6 ]
@@ -26,18 +26,18 @@ define i32 @cmp2(ptr readnone %0, ptr readnone %1) {
 ; CHECK-LABEL: 'cmp2'
   %3 = icmp eq ptr %0, %1
   br i1 %3, label %6, label %4
-; CHECK:   edge  -> 6 probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  -> 4 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge %2 -> %6 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge %2 -> %4 probability is 0x50000000 / 0x80000000 = 62.50%
 
 4:                                                ; preds = %2
   %5 = tail call i32 @f() #2
   br label %8
-; CHECK:   edge 4 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %4 -> %8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 6:                                                ; preds = %2
   %7 = tail call i32 @g() #2
   br label %8
-; CHECK:   edge 6 -> 8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %6 -> %8 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 8:                                                ; preds = %6, %4
   %9 = phi i32 [ %5, %4 ], [ %7, %6 ]
@@ -48,18 +48,18 @@ define i32 @cmp3(ptr readnone %0) {
 ; CHECK-LABEL: 'cmp3'
   %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
-; CHECK:   edge  -> 3 probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:   edge  -> 5 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:   edge %1 -> %3 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:   edge %1 -> %5 probability is 0x50000000 / 0x80000000 = 62.50%
 
 3:                                                ; preds = %1
   %4 = tail call i32 @f() #2
   br label %7
-; CHECK:   edge 3 -> 7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %3 -> %7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 5:                                                ; preds = %1
   %6 = tail call i32 @g() #2
   br label %7
-; CHECK:   edge 5 -> 7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:   edge %5 -> %7 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 7:                                                ; preds = %5, %3
   %8 = phi i32 [ %6, %5 ], [ %4, %3 ]

>From c3ef876d2c345df00da00eaf9856b6f2ca16c329 Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Fri, 1 Dec 2023 14:35:39 -0800
Subject: [PATCH 3/3] Updated remaining tests.

---
 .../BranchProbabilityInfo/anonymous-bb.ll     |  18 +-
 .../Analysis/BranchProbabilityInfo/basic.ll   | 240 +++++++-------
 .../BranchProbabilityInfo/deopt-intrinsic.ll  |   4 +-
 .../BranchProbabilityInfo/deopt-invoke.ll     |  30 +-
 .../Analysis/BranchProbabilityInfo/fcmp.ll    |   8 +-
 .../Analysis/BranchProbabilityInfo/hoist.ll   |  16 +-
 .../BranchProbabilityInfo/libfunc_call.ll     | 120 +++----
 .../Analysis/BranchProbabilityInfo/loop.ll    | 292 +++++++++---------
 .../BranchProbabilityInfo/noreturn.ll         |  38 +--
 .../Analysis/BranchProbabilityInfo/pr18705.ll |   4 +-
 .../Analysis/BranchProbabilityInfo/pr22718.ll |   4 +-
 .../Analysis/BranchProbabilityInfo/switch.ll  |  26 +-
 .../BranchProbabilityInfo/unreachable.ll      |  60 ++--
 .../BranchProbabilityInfo/zero_heuristics.ll  |  12 +-
 llvm/test/Transforms/PGOProfile/indirectbr.ll |  18 +-
 llvm/test/Transforms/SampleProfile/branch.ll  |  16 +-
 llvm/test/Transforms/SampleProfile/calls.ll   |   8 +-
 .../Transforms/SampleProfile/discriminator.ll |   8 +-
 llvm/test/Transforms/SampleProfile/fnptr.ll   |  12 +-
 .../Transforms/SampleProfile/fsafdo_test.ll   |  54 ++--
 llvm/test/Transforms/SampleProfile/offset.ll  |   4 +-
 ...ofile-inference-even-count-distribution.ll |  16 +-
 .../profile-inference-rebalance-large.ll      |  54 ++--
 .../profile-inference-rebalance.ll            |  32 +-
 .../SampleProfile/profile-inference.ll        |  36 +--
 .../Transforms/SampleProfile/propagate.ll     |  12 +-
 llvm/test/Transforms/SampleProfile/remap.ll   |  12 +-
 .../branch-probability-analysis.ll.expected   |   2 +-
 28 files changed, 580 insertions(+), 576 deletions(-)

diff --git a/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
index 3a06cbcac83fd3f..21a96f762133099 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/anonymous-bb.ll
@@ -1,7 +1,12 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 define void @fct() {
-; CHECK-LABEL: fct
+; CHECK-LABEL: 'fct'
+; CHECK-NEXT:  ---- Branch Probabilities ----
+; CHECK-NEXT:    edge %entry -> %0 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %0 -> %1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;
 entry:
   br label %0
 0:
@@ -10,16 +15,15 @@ entry:
   ret void
 }
 
-; CHECK: edge %entry -> %0
-; CHECK: edge %0 -> %1
-
 define void @fct2() {
-; CHECK-LABEL: fct2
+; CHECK-LABEL: 'fct2'
+; CHECK-NEXT:  ---- Branch Probabilities ----
+; CHECK-NEXT:    edge %0 -> %1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %1 -> %2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;
   br label %1
 1:
   br label %2
 2:
   ret void
 }
-; CHECK: edge %0 -> %1
-; CHECK: edge %1 -> %2
\ No newline at end of file
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/basic.ll b/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
index 4d280da84a0003b..d09a85aff1e6fb2 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
@@ -4,9 +4,9 @@
 define i32 @test1(i32 %i, ptr %a) {
 ; CHECK-LABEL: 'test1'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge body -> exit probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK-NEXT:    edge body -> body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %body -> %exit probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK-NEXT:    edge %body -> %body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 ;
 entry:
   br label %body
@@ -28,10 +28,10 @@ exit:
 define i32 @test2(i32 %i, i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test2'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge entry -> else probability is 0x07878788 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %else probability is 0x07878788 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   %cond = icmp ult i32 %i, 42
@@ -53,16 +53,16 @@ exit:
 define i32 @test3(i32 %i, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
 ; CHECK-LABEL: 'test3'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> case_a probability is 0x06666666 / 0x80000000 = 5.00%
-; CHECK-NEXT:    edge entry -> case_b probability is 0x06666666 / 0x80000000 = 5.00%
-; CHECK-NEXT:    edge entry -> case_c probability is 0x66666666 / 0x80000000 = 80.00%
-; CHECK-NEXT:    edge entry -> case_d probability is 0x06666666 / 0x80000000 = 5.00%
-; CHECK-NEXT:    edge entry -> case_e probability is 0x06666666 / 0x80000000 = 5.00%
-; CHECK-NEXT:    edge case_a -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_b -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_c -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_d -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_e -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_a probability is 0x06666666 / 0x80000000 = 5.00%
+; CHECK-NEXT:    edge %entry -> %case_b probability is 0x06666666 / 0x80000000 = 5.00%
+; CHECK-NEXT:    edge %entry -> %case_c probability is 0x66666666 / 0x80000000 = 80.00%
+; CHECK-NEXT:    edge %entry -> %case_d probability is 0x06666666 / 0x80000000 = 5.00%
+; CHECK-NEXT:    edge %entry -> %case_e probability is 0x06666666 / 0x80000000 = 5.00%
+; CHECK-NEXT:    edge %case_a -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_b -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_c -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_d -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_e -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   switch i32 %i, label %case_a [ i32 1, label %case_b
@@ -95,13 +95,13 @@ exit:
 define i32 @test4(i32 %x) nounwind uwtable readnone ssp {
 ; CHECK-LABEL: 'test4'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> return probability is 0x0a8a8a8b / 0x80000000 = 8.24%
-; CHECK-NEXT:    edge entry -> sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
-; CHECK-NEXT:    edge entry -> sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
-; CHECK-NEXT:    edge entry -> sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
-; CHECK-NEXT:    edge entry -> sw.bb1 probability is 0x60606060 / 0x80000000 = 75.29%
-; CHECK-NEXT:    edge sw.bb -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge sw.bb1 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %return probability is 0x0a8a8a8b / 0x80000000 = 8.24%
+; CHECK-NEXT:    edge %entry -> %sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
+; CHECK-NEXT:    edge %entry -> %sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
+; CHECK-NEXT:    edge %entry -> %sw.bb probability is 0x15151515 / 0x80000000 = 16.47%
+; CHECK-NEXT:    edge %entry -> %sw.bb1 probability is 0x60606060 / 0x80000000 = 75.29%
+; CHECK-NEXT:    edge %sw.bb -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %sw.bb1 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   %conv = sext i32 %x to i64
@@ -130,10 +130,10 @@ declare void @coldfunc() cold
 define i32 @test5(i32 %a, i32 %b, i1 %flag) {
 ; CHECK-LABEL: 'test5'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge entry -> else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br i1 %flag, label %then, label %else
@@ -153,11 +153,11 @@ exit:
 define i32 @test_cold_loop(i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test_cold_loop'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> header probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge entry -> exit probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge header -> body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge body -> header probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK-NEXT:    edge body -> exit probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK-NEXT:    edge %entry -> %header probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %header -> %body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %body -> %header probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK-NEXT:    edge %body -> %exit probability is 0x0041edfd / 0x80000000 = 0.20%
 ;
 entry:
   %cond1 = icmp eq i32 %a, 42
@@ -178,14 +178,14 @@ declare i32 @regular_function(i32 %i)
 define i32 @test_cold_call_sites_with_prof(i32 %a, i32 %b, i1 %flag, i1 %flag2) {
 ; CHECK-LABEL: 'test_cold_call_sites_with_prof'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge entry -> else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge then -> then2 probability is 0x7ebb907a / 0x80000000 = 99.01% [HOT edge]
-; CHECK-NEXT:    edge then -> else2 probability is 0x01446f86 / 0x80000000 = 0.99%
-; CHECK-NEXT:    edge then2 -> join probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else2 -> join probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge join -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %then -> %then2 probability is 0x7ebb907a / 0x80000000 = 99.01% [HOT edge]
+; CHECK-NEXT:    edge %then -> %else2 probability is 0x01446f86 / 0x80000000 = 0.99%
+; CHECK-NEXT:    edge %then2 -> %join probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else2 -> %join probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %join -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br i1 %flag, label %then, label %else
@@ -222,10 +222,10 @@ define i32 @test_cold_call_sites(ptr %a) {
 ; after that is fixed.
 ; CHECK-LABEL: 'test_cold_call_sites'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge entry -> else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 
 entry:
@@ -253,12 +253,12 @@ exit:
 define i32 @test_invoke_code_callsite1(i1 %c) personality ptr @__gxx_personality_v0 {
 ; CHECK-LABEL: 'test_invoke_code_callsite1'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> if.then probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge entry -> if.end probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge if.then -> invoke.cont probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge if.then -> lpad probability is 0x00008000 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge invoke.cont -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge lpad -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %if.then probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %entry -> %if.end probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %if.then -> %invoke.cont probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %if.then -> %lpad probability is 0x00008000 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %invoke.cont -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %lpad -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br i1 %c, label %if.then, label %if.end
@@ -286,12 +286,12 @@ if.end:
 define i32 @test_invoke_code_callsite2(i1 %c) personality ptr @__gxx_personality_v0 {
 ; CHECK-LABEL: 'test_invoke_code_callsite2'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> if.then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge entry -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge if.then -> invoke.cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge if.then -> lpad probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge invoke.cont -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge lpad -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %if.then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %entry -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %if.then -> %invoke.cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %if.then -> %lpad probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %invoke.cont -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %lpad -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br i1 %c, label %if.then, label %if.end
@@ -317,12 +317,12 @@ if.end:
 define i32 @test_invoke_code_callsite3(i1 %c) personality ptr @__gxx_personality_v0 {
 ; CHECK-LABEL: 'test_invoke_code_callsite3'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> if.then probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK-NEXT:    edge entry -> if.end probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK-NEXT:    edge if.then -> invoke.cont probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge if.then -> lpad probability is 0x00008000 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge invoke.cont -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge lpad -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %if.then probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK-NEXT:    edge %entry -> %if.end probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK-NEXT:    edge %if.then -> %invoke.cont probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %if.then -> %lpad probability is 0x00008000 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %invoke.cont -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %lpad -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br i1 %c, label %if.then, label %if.end
@@ -350,12 +350,12 @@ if.end:
 define void @test_invoke_code_profiled(i1 %c) personality ptr @__gxx_personality_v0 {
 ; CHECK-LABEL: 'test_invoke_code_profiled'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> invoke.to0 probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge entry -> lpad probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge invoke.to0 -> invoke.to1 probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge invoke.to0 -> lpad probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge invoke.to1 -> invoke.to2 probability is 0x55555555 / 0x80000000 = 66.67%
-; CHECK-NEXT:    edge invoke.to1 -> lpad probability is 0x2aaaaaab / 0x80000000 = 33.33%
+; CHECK-NEXT:    edge %entry -> %invoke.to0 probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %lpad probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %invoke.to0 -> %invoke.to1 probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %invoke.to0 -> %lpad probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %invoke.to1 -> %invoke.to2 probability is 0x55555555 / 0x80000000 = 66.67%
+; CHECK-NEXT:    edge %invoke.to1 -> %lpad probability is 0x2aaaaaab / 0x80000000 = 33.33%
 ;
 entry:
   invoke i32 @InvokeCall() to label %invoke.to0 unwind label %lpad
@@ -388,10 +388,10 @@ attributes #0 = { cold }
 define i32 @zero1(i32 %i, i32 %a, i32 %b) {
 ; CHECK-LABEL: 'zero1'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK-NEXT:    edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK-NEXT:    edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK-NEXT:    edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   %cond = icmp eq i32 %i, 0
@@ -411,10 +411,10 @@ exit:
 define i32 @zero2(i32 %i, i32 %a, i32 %b) {
 ; CHECK-LABEL: 'zero2'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK-NEXT:    edge entry -> else probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK-NEXT:    edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK-NEXT:    edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   %cond = icmp ne i32 %i, -1
@@ -434,11 +434,11 @@ exit:
 define i32 @zero3(i32 %i, i32 %a, i32 %b) {
 ; CHECK-LABEL: 'zero3'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK-NEXT:    edge then -> else probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK-NEXT:    edge then -> exit probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK-NEXT:    edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK-NEXT:    edge %then -> %else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK-NEXT:    edge %then -> %exit probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK-NEXT:    edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
 ; AND'ing with a single bit bitmask essentially leads to a bool comparison,
@@ -465,8 +465,8 @@ exit:
 define i32 @test_unreachable_with_prof_greater(i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test_unreachable_with_prof_greater'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge entry -> unr probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %unr probability is 0x00000001 / 0x80000000 = 0.00%
 ;
 entry:
   %cond = icmp eq i32 %a, 42
@@ -485,8 +485,8 @@ exit:
 define i32 @test_unreachable_with_prof_equal(i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test_unreachable_with_prof_equal'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge entry -> unr probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %unr probability is 0x00000001 / 0x80000000 = 0.00%
 ;
 entry:
   %cond = icmp eq i32 %a, 42
@@ -505,8 +505,8 @@ exit:
 define i32 @test_unreachable_with_prof_zero(i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test_unreachable_with_prof_zero'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge entry -> unr probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %unr probability is 0x00000001 / 0x80000000 = 0.00%
 ;
 entry:
   %cond = icmp eq i32 %a, 42
@@ -525,8 +525,8 @@ exit:
 define i32 @test_unreachable_with_prof_less(i32 %a, i32 %b) {
 ; CHECK-LABEL: 'test_unreachable_with_prof_less'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge entry -> unr probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %unr probability is 0x00000000 / 0x80000000 = 0.00%
 ;
 entry:
   %cond = icmp eq i32 %a, 42
@@ -545,15 +545,15 @@ exit:
 define i32 @test_unreachable_with_switch_prof1(i32 %i, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
 ; CHECK-LABEL: 'test_unreachable_with_switch_prof1'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> case_a probability is 0x00000001 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge entry -> case_b probability is 0x06bca1af / 0x80000000 = 5.26%
-; CHECK-NEXT:    edge entry -> case_c probability is 0x6bca1af3 / 0x80000000 = 84.21% [HOT edge]
-; CHECK-NEXT:    edge entry -> case_d probability is 0x06bca1af / 0x80000000 = 5.26%
-; CHECK-NEXT:    edge entry -> case_e probability is 0x06bca1af / 0x80000000 = 5.26%
-; CHECK-NEXT:    edge case_b -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_c -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_d -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_e -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_a probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %case_b probability is 0x06bca1af / 0x80000000 = 5.26%
+; CHECK-NEXT:    edge %entry -> %case_c probability is 0x6bca1af3 / 0x80000000 = 84.21% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_d probability is 0x06bca1af / 0x80000000 = 5.26%
+; CHECK-NEXT:    edge %entry -> %case_e probability is 0x06bca1af / 0x80000000 = 5.26%
+; CHECK-NEXT:    edge %case_b -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_c -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_d -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_e -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   switch i32 %i, label %case_a [
@@ -591,14 +591,14 @@ exit:
 define i32 @test_unreachable_with_switch_prof2(i32 %i, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
 ; CHECK-LABEL: 'test_unreachable_with_switch_prof2'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> case_a probability is 0x00000001 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge entry -> case_b probability is 0x00000001 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge entry -> case_c probability is 0x71c71c71 / 0x80000000 = 88.89% [HOT edge]
-; CHECK-NEXT:    edge entry -> case_d probability is 0x071c71c7 / 0x80000000 = 5.56%
-; CHECK-NEXT:    edge entry -> case_e probability is 0x071c71c7 / 0x80000000 = 5.56%
-; CHECK-NEXT:    edge case_c -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_d -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_e -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_a probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %case_b probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %case_c probability is 0x71c71c71 / 0x80000000 = 88.89% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_d probability is 0x071c71c7 / 0x80000000 = 5.56%
+; CHECK-NEXT:    edge %entry -> %case_e probability is 0x071c71c7 / 0x80000000 = 5.56%
+; CHECK-NEXT:    edge %case_c -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_d -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_e -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   switch i32 %i, label %case_a [ i32 1, label %case_b
@@ -635,14 +635,14 @@ exit:
 define i32 @test_unreachable_with_switch_prof3(i32 %i, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
 ; CHECK-LABEL: 'test_unreachable_with_switch_prof3'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> case_a probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge entry -> case_b probability is 0x00000001 / 0x80000000 = 0.00%
-; CHECK-NEXT:    edge entry -> case_c probability is 0x71c71c71 / 0x80000000 = 88.89% [HOT edge]
-; CHECK-NEXT:    edge entry -> case_d probability is 0x071c71c7 / 0x80000000 = 5.56%
-; CHECK-NEXT:    edge entry -> case_e probability is 0x071c71c7 / 0x80000000 = 5.56%
-; CHECK-NEXT:    edge case_c -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_d -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK-NEXT:    edge case_e -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_a probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %case_b probability is 0x00000001 / 0x80000000 = 0.00%
+; CHECK-NEXT:    edge %entry -> %case_c probability is 0x71c71c71 / 0x80000000 = 88.89% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %case_d probability is 0x071c71c7 / 0x80000000 = 5.56%
+; CHECK-NEXT:    edge %entry -> %case_e probability is 0x071c71c7 / 0x80000000 = 5.56%
+; CHECK-NEXT:    edge %case_c -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_d -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %case_e -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   switch i32 %i, label %case_a [ i32 1, label %case_b
@@ -678,11 +678,11 @@ exit:
 define i32 @test_unreachable_with_switch_prof4(i32 %i, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
 ; CHECK-LABEL: 'test_unreachable_with_switch_prof4'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> case_a probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK-NEXT:    edge entry -> case_b probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK-NEXT:    edge entry -> case_c probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK-NEXT:    edge entry -> case_d probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK-NEXT:    edge entry -> case_e probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK-NEXT:    edge %entry -> %case_a probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK-NEXT:    edge %entry -> %case_b probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK-NEXT:    edge %entry -> %case_c probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK-NEXT:    edge %entry -> %case_d probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK-NEXT:    edge %entry -> %case_e probability is 0x1999999a / 0x80000000 = 20.00%
 ;
 entry:
   switch i32 %i, label %case_a [ i32 1, label %case_b
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll b/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
index 8dffb09e4ad06ca..81fb1e3cb99a3c4 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
@@ -8,8 +8,8 @@ entry:
   %cond = icmp eq i32 %a, 42
   br i1 %cond, label %exit, label %deopt
 
-; CHECK:  edge entry -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK:  edge entry -> deopt probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %entry -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %entry -> %deopt probability is 0x00000000 / 0x80000000 = 0.00%
 
 deopt:
   %rval = call i32(...) @llvm.experimental.deoptimize.i32() [ "deopt"() ]
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/deopt-invoke.ll b/llvm/test/Analysis/BranchProbabilityInfo/deopt-invoke.ll
index ae46ed7851f895e..f6b906b95ec6eed 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/deopt-invoke.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/deopt-invoke.ll
@@ -9,11 +9,11 @@ declare void @cold() cold
 ; Even though the likeliness of 'invoke' to throw an exception is assessed as low
 ; all other paths are even less likely. Check that hot paths leads to excepion handler.
 define void @test1(i32 %0) personality ptr @"personality_function"  !prof !1 {
-;CHECK: edge entry -> unreached probability is 0x00000001 / 0x80000000 = 0.00%
-;CHECK: edge entry -> invoke probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge invoke -> invoke.cont.unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge invoke -> land.pad probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge land.pad -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %unreached probability is 0x00000001 / 0x80000000 = 0.00%
+;CHECK: edge %entry -> %invoke probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %invoke -> %invoke.cont.unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %invoke -> %land.pad probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %land.pad -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %unreached, label %invoke, !prof !2
@@ -39,11 +39,11 @@ exit:
 }
 
 define void @test2(i32 %0) personality ptr @"personality_function" {
-;CHECK: edge entry -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge entry -> invoke probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge invoke -> invoke.cont.cold probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge invoke -> land.pad probability is 0x00008000 / 0x80000000 = 0.00%
-;CHECK: edge land.pad -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %entry -> %invoke probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %invoke -> %invoke.cont.cold probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %invoke -> %land.pad probability is 0x00008000 / 0x80000000 = 0.00%
+;CHECK: edge %land.pad -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %unreached, label %invoke
@@ -69,11 +69,11 @@ exit:
 }
 
 define void @test3(i32 %0) personality ptr @"personality_function" {
-;CHECK: edge entry -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge entry -> invoke probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge invoke -> invoke.cont.cold probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge invoke -> land.pad probability is 0x00008000 / 0x80000000 = 0.00%
-;CHECK: edge land.pad -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %entry -> %invoke probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %invoke -> %invoke.cont.cold probability is 0x7fff8000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %invoke -> %land.pad probability is 0x00008000 / 0x80000000 = 0.00%
+;CHECK: edge %land.pad -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 entry:
   br i1 undef, label %unreached, label %invoke
 invoke:
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll b/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
index e65aec1f296d08b..9e7629b4c9714e9 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
@@ -3,8 +3,8 @@
 ; This function tests the floating point unorder comparison. The probability
 ; of NaN should be extremely small.
 ; CHECK: Printing analysis {{.*}} for function 'uno'
-; CHECK:  edge  -> a probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK:  edge  -> b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %0 -> %a probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK:  edge %0 -> %b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
 
 define void @uno(float %val1, float %val2) {
   %cond = fcmp uno float %val1, %val2
@@ -21,8 +21,8 @@ b:
 
 ; This function tests the floating point order comparison.
 ; CHECK: Printing analysis {{.*}} for function 'ord'
-; CHECK:  edge  -> a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK:  edge  -> b probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK:  edge %0 -> %a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %0 -> %b probability is 0x00000800 / 0x80000000 = 0.00%
 
 define void @ord(float %val1, float %val2) {
   %cond = fcmp ord float %val1, %val2
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/hoist.ll b/llvm/test/Analysis/BranchProbabilityInfo/hoist.ll
index 3fa41c63b5f4622..b0425ae48306868 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/hoist.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/hoist.ll
@@ -1,10 +1,10 @@
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: no_hoist
-; CHECK: edge entry -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> if.then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end -> if.end4 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end -> if.then3 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %if.then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %if.end4 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %if.then3 probability is 0x40000000 / 0x80000000 = 50.00%
 define dso_local void @no_hoist(i64 %arg1, i64 %arg2) local_unnamed_addr #0 {
 entry:
   %and = and i64 %arg1, 1152921504606846976
@@ -29,10 +29,10 @@ if.end4:                                          ; preds = %if.then3, %if.end
 }
 
 ; CHECK-LABEL: hoist
-; CHECK: edge entry -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> if.then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end -> if.end4 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end -> if.then3 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %if.then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %if.end4 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %if.then3 probability is 0x40000000 / 0x80000000 = 50.00%
 define dso_local void @hoist(i64 %arg1, i64 %arg2) local_unnamed_addr #0 {
 entry:
   %const = bitcast i64 1152921504606846976 to i64
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll b/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
index 7b38f9e3da609a7..c342edcc64afc8b 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
@@ -18,16 +18,16 @@ entry:
   %val = call i32 @strcmp(ptr %p, ptr %q)
   %cond = icmp eq i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -40,16 +40,16 @@ entry:
   %val = call i32 @strcmp(ptr %p, ptr %q)
   %cond = icmp eq i32 %val, 5
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -62,16 +62,16 @@ entry:
   %val = call i32 @strcmp(ptr %p, ptr %q)
   %cond = icmp ne i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %else probability is 0x30000000 / 0x80000000 = 37.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -84,16 +84,16 @@ entry:
   %val = call i32 @strcmp(ptr %p, ptr %q)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -106,16 +106,16 @@ entry:
   %val = call i32 @strcmp(ptr %p, ptr %q)
   %cond = icmp slt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -131,16 +131,16 @@ entry:
   %val = call i32 @strncmp(ptr %p, ptr %q, i32 4)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -153,16 +153,16 @@ entry:
   %val = call i32 @strcasecmp(ptr %p, ptr %q)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -175,16 +175,16 @@ entry:
   %val = call i32 @strncasecmp(ptr %p, ptr %q, i32 4)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -197,16 +197,16 @@ entry:
   %val = call i32 @memcmp(ptr %p, ptr %q)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge entry -> else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %entry -> %else probability is 0x40000000 / 0x80000000 = 50.00%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -224,16 +224,16 @@ entry:
   %val = call i32 @nonstrcmp(ptr %p, ptr %q)
   %cond = icmp eq i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -246,16 +246,16 @@ entry:
   %val = call i32 @nonstrcmp(ptr %p, ptr %q)
   %cond = icmp ne i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %else probability is 0x30000000 / 0x80000000 = 37.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -268,16 +268,16 @@ entry:
   %val = call i32 @nonstrcmp(ptr %p, ptr %q)
   %cond = icmp sgt i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %else probability is 0x30000000 / 0x80000000 = 37.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -291,16 +291,16 @@ entry:
   %val = call i32 @bcmp(ptr %p, ptr %q)
   %cond = icmp eq i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -313,16 +313,16 @@ entry:
   %val = call i32 @bcmp(ptr %p, ptr %q)
   %cond = icmp eq i32 %val, 5
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge entry -> else probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %else probability is 0x50000000 / 0x80000000 = 62.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
@@ -337,16 +337,16 @@ entry:
   %val = call i32 @bcmp(ptr %p, ptr %q)
   %cond = icmp ne i32 %val, 0
   br i1 %cond, label %then, label %else
-; CHECK: edge entry -> then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %else probability is 0x30000000 / 0x80000000 = 37.50%
 
 then:
   br label %exit
-; CHECK: edge then -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %then -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 else:
   br label %exit
-; CHECK: edge else -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %else -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/loop.ll b/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
index c2aa705d3495793..0b02cedf03df3eb 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
@@ -10,13 +10,13 @@ declare i32 @g5()
 define void @test1(i32 %a, i32 %b) {
 entry:
   br label %do.body
-; CHECK: edge entry -> do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body:
   %i.0 = phi i32 [ 0, %entry ], [ %inc3, %do.end ]
   call void @g1()
   br label %do.body1
-; CHECK: edge do.body -> do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.body -> %do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body1:
   %j.0 = phi i32 [ 0, %do.body ], [ %inc, %do.body1 ]
@@ -24,16 +24,16 @@ do.body1:
   %inc = add nsw i32 %j.0, 1
   %cmp = icmp slt i32 %inc, %b
   br i1 %cmp, label %do.body1, label %do.end
-; CHECK: edge do.body1 -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.body1 -> do.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body1 -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body1 -> %do.end probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end:
   call void @g3()
   %inc3 = add nsw i32 %i.0, 1
   %cmp4 = icmp slt i32 %inc3, %a
   br i1 %cmp4, label %do.body, label %do.end5
-; CHECK: edge do.end -> do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.end -> do.end5 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.end -> %do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.end -> %do.end5 probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end5:
   call void @g4()
@@ -44,20 +44,20 @@ define void @test2(i32 %a, i32 %b) {
 entry:
   %cmp9 = icmp sgt i32 %a, 0
   br i1 %cmp9, label %for.body.lr.ph, label %for.end6
-; CHECK: edge entry -> for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> for.end6 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %for.end6 probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body.lr.ph:
   %cmp27 = icmp sgt i32 %b, 0
   br label %for.body
-; CHECK: edge for.body.lr.ph -> for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.body.lr.ph -> %for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.body:
   %i.010 = phi i32 [ 0, %for.body.lr.ph ], [ %inc5, %for.end ]
   call void @g1()
   br i1 %cmp27, label %for.body3, label %for.end
-; CHECK: edge for.body -> for.body3 probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge for.body -> for.end probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %for.body -> %for.body3 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %for.body -> %for.end probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body3:
   %j.08 = phi i32 [ %inc, %for.body3 ], [ 0, %for.body ]
@@ -65,16 +65,16 @@ for.body3:
   %inc = add nsw i32 %j.08, 1
   %exitcond = icmp eq i32 %inc, %b
   br i1 %exitcond, label %for.end, label %for.body3
-; CHECK: edge for.body3 -> for.end probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.body3 -> for.body3 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.body3 -> %for.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.body3 -> %for.body3 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end:
   call void @g3()
   %inc5 = add nsw i32 %i.010, 1
   %exitcond11 = icmp eq i32 %inc5, %a
   br i1 %exitcond11, label %for.end6, label %for.body
-; CHECK: edge for.end -> for.end6 probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.end -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.end -> %for.end6 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.end -> %for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end6:
   call void @g4()
@@ -84,7 +84,7 @@ for.end6:
 define void @test3(i32 %a, i32 %b, ptr %c) {
 entry:
   br label %do.body
-; CHECK: edge entry -> do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body:
   %i.0 = phi i32 [ 0, %entry ], [ %inc4, %if.end ]
@@ -92,8 +92,8 @@ do.body:
   %0 = load i32, ptr %c, align 4
   %cmp = icmp slt i32 %0, 42
   br i1 %cmp, label %do.body1, label %if.end
-; CHECK: edge do.body -> do.body1 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge do.body -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %do.body -> %do.body1 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %do.body -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
 
 do.body1:
   %j.0 = phi i32 [ %inc, %do.body1 ], [ 0, %do.body ]
@@ -101,16 +101,16 @@ do.body1:
   %inc = add nsw i32 %j.0, 1
   %cmp2 = icmp slt i32 %inc, %b
   br i1 %cmp2, label %do.body1, label %if.end
-; CHECK: edge do.body1 -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.body1 -> if.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body1 -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body1 -> %if.end probability is 0x04000000 / 0x80000000 = 3.12%
 
 if.end:
   call void @g3()
   %inc4 = add nsw i32 %i.0, 1
   %cmp5 = icmp slt i32 %inc4, %a
   br i1 %cmp5, label %do.body, label %do.end6
-; CHECK: edge if.end -> do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge if.end -> do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %if.end -> %do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %if.end -> %do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end6:
   call void @g4()
@@ -120,7 +120,7 @@ do.end6:
 define void @test4(i32 %a, i32 %b, ptr %c) {
 entry:
   br label %do.body
-; CHECK: edge entry -> do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body:
   %i.0 = phi i32 [ 0, %entry ], [ %inc4, %do.end ]
@@ -128,8 +128,8 @@ do.body:
   %0 = load i32, ptr %c, align 4
   %cmp = icmp slt i32 %0, 42
   br i1 %cmp, label %return, label %do.body1
-; CHECK: edge do.body -> return probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge do.body -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body -> %return probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 do.body1:
   %j.0 = phi i32 [ %inc, %do.body1 ], [ 0, %do.body ]
@@ -137,21 +137,21 @@ do.body1:
   %inc = add nsw i32 %j.0, 1
   %cmp2 = icmp slt i32 %inc, %b
   br i1 %cmp2, label %do.body1, label %do.end
-; CHECK: edge do.body1 -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.body1 -> do.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body1 -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body1 -> %do.end probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end:
   call void @g3()
   %inc4 = add nsw i32 %i.0, 1
   %cmp5 = icmp slt i32 %inc4, %a
   br i1 %cmp5, label %do.body, label %do.end6
-; CHECK: edge do.end -> do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.end -> do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.end -> %do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.end -> %do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end6:
   call void @g4()
   br label %return
-; CHECK: edge do.end6 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.end6 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 return:
   ret void
@@ -160,42 +160,42 @@ return:
 define void @test5(i32 %a, i32 %b, ptr %c) {
 entry:
   br label %do.body
-; CHECK: edge entry -> do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body:
   %i.0 = phi i32 [ 0, %entry ], [ %inc4, %do.end ]
   call void @g1()
   br label %do.body1
-; CHECK: edge do.body -> do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.body -> %do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body1:
   %j.0 = phi i32 [ 0, %do.body ], [ %inc, %if.end ]
   %0 = load i32, ptr %c, align 4
   %cmp = icmp slt i32 %0, 42
   br i1 %cmp, label %return, label %if.end
-; CHECK: edge do.body1 -> return probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge do.body1 -> if.end probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body1 -> %return probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body1 -> %if.end probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 if.end:
   call void @g2()
   %inc = add nsw i32 %j.0, 1
   %cmp2 = icmp slt i32 %inc, %b
   br i1 %cmp2, label %do.body1, label %do.end
-; CHECK: edge if.end -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge if.end -> do.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %if.end -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %if.end -> %do.end probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end:
   call void @g3()
   %inc4 = add nsw i32 %i.0, 1
   %cmp5 = icmp slt i32 %inc4, %a
   br i1 %cmp5, label %do.body, label %do.end6
-; CHECK: edge do.end -> do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.end -> do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.end -> %do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.end -> %do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end6:
   call void @g4()
   br label %return
-; CHECK: edge do.end6 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.end6 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 return:
   ret void
@@ -204,13 +204,13 @@ return:
 define void @test6(i32 %a, i32 %b, ptr %c) {
 entry:
   br label %do.body
-; CHECK: edge entry -> do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %do.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body:
   %i.0 = phi i32 [ 0, %entry ], [ %inc4, %do.end ]
   call void @g1()
   br label %do.body1
-; CHECK: edge do.body -> do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.body -> %do.body1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 do.body1:
   %j.0 = phi i32 [ 0, %do.body ], [ %inc, %do.cond ]
@@ -218,28 +218,28 @@ do.body1:
   %0 = load i32, ptr %c, align 4
   %cmp = icmp slt i32 %0, 42
   br i1 %cmp, label %return, label %do.cond
-; CHECK: edge do.body1 -> return probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge do.body1 -> do.cond probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.body1 -> %return probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.body1 -> %do.cond probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 do.cond:
   %inc = add nsw i32 %j.0, 1
   %cmp2 = icmp slt i32 %inc, %b
   br i1 %cmp2, label %do.body1, label %do.end
-; CHECK: edge do.cond -> do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.cond -> do.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.cond -> %do.body1 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.cond -> %do.end probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end:
   call void @g3()
   %inc4 = add nsw i32 %i.0, 1
   %cmp5 = icmp slt i32 %inc4, %a
   br i1 %cmp5, label %do.body, label %do.end6
-; CHECK: edge do.end -> do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge do.end -> do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %do.end -> %do.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %do.end -> %do.end6 probability is 0x04000000 / 0x80000000 = 3.12%
 
 do.end6:
   call void @g4()
   br label %return
-; CHECK: edge do.end6 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %do.end6 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 return:
   ret void
@@ -249,27 +249,27 @@ define void @test7(i32 %a, i32 %b, ptr %c) {
 entry:
   %cmp10 = icmp sgt i32 %a, 0
   br i1 %cmp10, label %for.body.lr.ph, label %for.end7
-; CHECK: edge entry -> for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> for.end7 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %for.end7 probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body.lr.ph:
   %cmp38 = icmp sgt i32 %b, 0
   br label %for.body
-; CHECK: edge for.body.lr.ph -> for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.body.lr.ph -> %for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.body:
   %i.011 = phi i32 [ 0, %for.body.lr.ph ], [ %inc6, %for.inc5 ]
   %0 = load i32, ptr %c, align 4
   %cmp1 = icmp eq i32 %0, %i.011
   br i1 %cmp1, label %for.inc5, label %if.end
-; CHECK: edge for.body -> for.inc5 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge for.body -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body -> %for.inc5 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
 
 if.end:
   call void @g1()
   br i1 %cmp38, label %for.body4, label %for.end
-; CHECK: edge if.end -> for.body4 probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge if.end -> for.end probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %if.end -> %for.body4 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %if.end -> %for.end probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body4:
   %j.09 = phi i32 [ %inc, %for.body4 ], [ 0, %if.end ]
@@ -277,20 +277,20 @@ for.body4:
   %inc = add nsw i32 %j.09, 1
   %exitcond = icmp eq i32 %inc, %b
   br i1 %exitcond, label %for.end, label %for.body4
-; CHECK: edge for.body4 -> for.end probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.body4 -> for.body4 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.body4 -> %for.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.body4 -> %for.body4 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end:
   call void @g3()
   br label %for.inc5
-; CHECK: edge for.end -> for.inc5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.end -> %for.inc5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.inc5:
   %inc6 = add nsw i32 %i.011, 1
   %exitcond12 = icmp eq i32 %inc6, %a
   br i1 %exitcond12, label %for.end7, label %for.body
-; CHECK: edge for.inc5 -> for.end7 probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.inc5 -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.inc5 -> %for.end7 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.inc5 -> %for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end7:
   call void @g4()
@@ -301,64 +301,64 @@ define void @test8(i32 %a, i32 %b, ptr %c) {
 entry:
   %cmp18 = icmp sgt i32 %a, 0
   br i1 %cmp18, label %for.body.lr.ph, label %for.end15
-; CHECK: edge entry -> for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge entry -> for.end15 probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %entry -> %for.body.lr.ph probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %entry -> %for.end15 probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body.lr.ph:
   %cmp216 = icmp sgt i32 %b, 0
   %arrayidx5 = getelementptr inbounds i32, ptr %c, i64 1
   %arrayidx9 = getelementptr inbounds i32, ptr %c, i64 2
   br label %for.body
-; CHECK: edge for.body.lr.ph -> for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.body.lr.ph -> %for.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.body:
   %i.019 = phi i32 [ 0, %for.body.lr.ph ], [ %inc14, %for.end ]
   call void @g1()
   br i1 %cmp216, label %for.body3, label %for.end
-; CHECK: edge for.body -> for.body3 probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge for.body -> for.end probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %for.body -> %for.body3 probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %for.body -> %for.end probability is 0x30000000 / 0x80000000 = 37.50%
 
 for.body3:
   %j.017 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
   %0 = load i32, ptr %c, align 4
   %cmp4 = icmp eq i32 %0, %j.017
   br i1 %cmp4, label %for.inc, label %if.end
-; CHECK: edge for.body3 -> for.inc probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge for.body3 -> if.end probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body3 -> %for.inc probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body3 -> %if.end probability is 0x40000000 / 0x80000000 = 50.00%
 
 if.end:
   %1 = load i32, ptr %arrayidx5, align 4
   %cmp6 = icmp eq i32 %1, %j.017
   br i1 %cmp6, label %for.inc, label %if.end8
-; CHECK: edge if.end -> for.inc probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end -> if.end8 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %for.inc probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end -> %if.end8 probability is 0x40000000 / 0x80000000 = 50.00%
 
 if.end8:
   %2 = load i32, ptr %arrayidx9, align 4
   %cmp10 = icmp eq i32 %2, %j.017
   br i1 %cmp10, label %for.inc, label %if.end12
-; CHECK: edge if.end8 -> for.inc probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.end8 -> if.end12 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end8 -> %for.inc probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.end8 -> %if.end12 probability is 0x40000000 / 0x80000000 = 50.00%
 
 if.end12:
   call void @g2()
   br label %for.inc
-; CHECK: edge if.end12 -> for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.end12 -> %for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.inc:
   %inc = add nsw i32 %j.017, 1
   %exitcond = icmp eq i32 %inc, %b
   br i1 %exitcond, label %for.end, label %for.body3
-; CHECK: edge for.inc -> for.end probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.inc -> for.body3 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.inc -> %for.end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.inc -> %for.body3 probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end:
   call void @g3()
   %inc14 = add nsw i32 %i.019, 1
   %exitcond20 = icmp eq i32 %inc14, %a
   br i1 %exitcond20, label %for.end15, label %for.body
-; CHECK: edge for.end -> for.end15 probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge for.end -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.end -> %for.end15 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.end -> %for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
 
 for.end15:
   call void @g4()
@@ -370,32 +370,32 @@ define void @test9(i32 %i, i32 %x, i32 %c) {
 entry:
   %tobool = icmp eq i32 %c, 0
   br i1 %tobool, label %if.end, label %midloop
-; CHECK:  edge entry -> if.end probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK:  edge entry -> midloop probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK:  edge %entry -> %if.end probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK:  edge %entry -> %midloop probability is 0x50000000 / 0x80000000 = 62.50%
 
 if.end:
   br label %for.cond
-; CHECK:  edge if.end -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %if.end -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.cond:
   %i.addr.0 = phi i32 [ %inc, %for.inc ], [ 0, %if.end ]
   %cmp = icmp slt i32 %i.addr.0, %x
   br i1 %cmp, label %midloop, label %end
-; CHECK:  edge for.cond -> midloop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK:  edge for.cond -> end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK:  edge %for.cond -> %midloop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK:  edge %for.cond -> %end probability is 0x04000000 / 0x80000000 = 3.12%
 
 midloop:
   %i.addr.1 = phi i32 [ %i, %entry ], [ %i.addr.0, %for.cond ]
   %call1 = call i32 @g5()
   %tobool2 = icmp eq i32 %call1, 0
   br i1 %tobool2, label %for.inc, label %end
-; CHECK:  edge midloop -> for.inc probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK:  edge midloop -> end probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK:  edge %midloop -> %for.inc probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK:  edge %midloop -> %end probability is 0x04000000 / 0x80000000 = 3.12%
 
 for.inc:
   %inc = add nsw i32 %i.addr.1, 1
   br label %for.cond
-; CHECK:  edge for.inc -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %for.inc -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 end:
   ret void
@@ -406,7 +406,7 @@ end:
 define i32 @test10(i32 %n, ptr %p) {
 entry:
   br label %for.cond
-; CHECK: edge entry -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.cond:
   %count.0 = phi i32 [ 0, %entry ], [ %count.1, %for.inc ]
@@ -414,8 +414,8 @@ for.cond:
   %i.0 = phi i32 [ 0, %entry ], [ %inc3, %for.inc ]
   %cmp = icmp slt i32 %i.0, %n
   br i1 %cmp, label %for.body, label %for.cond.cleanup
-; CHECK: edge for.cond -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge for.cond -> for.cond.cleanup probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.cond -> %for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.cond -> %for.cond.cleanup probability is 0x04000000 / 0x80000000 = 3.12%
 
 for.cond.cleanup:
   ret i32 %sum.0
@@ -427,19 +427,19 @@ for.body:
   %inc = add nsw i32 %count.0, 1
   %cmp1 = icmp sgt i32 %count.0, 6
   br i1 %cmp1, label %if.then, label %for.inc
-; CHECK: edge for.body -> if.then probability is 0x2aaaa8e4 / 0x80000000 = 33.33%
-; CHECK: edge for.body -> for.inc probability is 0x5555571c / 0x80000000 = 66.67%
+; CHECK: edge %for.body -> %if.then probability is 0x2aaaa8e4 / 0x80000000 = 33.33%
+; CHECK: edge %for.body -> %for.inc probability is 0x5555571c / 0x80000000 = 66.67%
 if.then:
   store i32 %add, ptr %arrayidx, align 4
   br label %for.inc
-; CHECK: edge if.then -> for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then -> %for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.inc:
   %count.1 = phi i32 [ 0, %if.then ], [ %inc, %for.body ]
   %sum.1 = phi i32 [ 0, %if.then ], [ %add, %for.body ]
   %inc3 = add nsw i32 %i.0, 1
   br label %for.cond
-; CHECK: edge for.inc -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.inc -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 }
 
 ; Each successor to for.body makes itself not be taken in the next iteration, so
@@ -447,7 +447,7 @@ for.inc:
 define i32 @test11(i32 %n, ptr %p) {
 entry:
   br label %for.cond
-; CHECK: edge entry -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.cond:
   %flip.0 = phi i32 [ 0, %entry ], [ %flip.1, %for.inc ]
@@ -455,8 +455,8 @@ for.cond:
   %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
   %cmp = icmp slt i32 %i.0, %n
   br i1 %cmp, label %for.body, label %for.cond.cleanup
-; CHECK: edge for.cond -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge for.cond -> for.cond.cleanup probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %for.cond -> %for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %for.cond -> %for.cond.cleanup probability is 0x04000000 / 0x80000000 = 3.12%
 
 for.cond.cleanup:
   ret i32 %sum.0
@@ -466,26 +466,26 @@ for.body:
   %arrayidx1 = getelementptr inbounds i32, ptr %p, i32 %i.0
   %0 = load i32, ptr %arrayidx1, align 4
   br i1 %tobool, label %if.else, label %if.then
-; CHECK: edge for.body -> if.else probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge for.body -> if.then probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body -> %if.else probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %for.body -> %if.then probability is 0x40000000 / 0x80000000 = 50.00%
 
 if.then:
   %add = add nsw i32 %0, %sum.0
   store i32 %add, ptr %arrayidx1, align 4
   br label %for.inc
-; CHECK: edge if.then -> for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then -> %for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.else:
   %add2 = add nsw i32 %sum.0, %0
   br label %for.inc
-; CHECK: edge if.else -> for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.else -> %for.inc probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.inc:
   %flip.1 = phi i32 [ 0, %if.then ], [ 1, %if.else ]
   %sum.1 = phi i32 [ %sum.0, %if.then ], [ %add2, %if.else ]
   %inc = add nsw i32 %i.0, 1
   br label %for.cond
-; CHECK: edge for.inc -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %for.inc -> %for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 }
 
 ; The loop heuristic should not overwrite the invoke heuristic. The unwind destination
@@ -493,21 +493,21 @@ for.inc:
 define void @test12(i32 %a) personality i8 0 {
 entry:
   br label %loop
-; CHECK: edge entry -> loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 loop:
   %i.0 = phi i32 [ 0, %entry ], [ %inc, %invoke.cont ]
   invoke i32 @InvokeCall()
           to label %invoke.cont unwind label %lpad
-; CHECK: edge loop -> invoke.cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge loop -> lpad probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %loop -> %invoke.cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %loop -> %lpad probability is 0x00000800 / 0x80000000 = 0.00%
 
 invoke.cont:
   %inc = add nsw i32 %i.0, 1
   %cmp = icmp slt i32 %inc, %a
   br i1 %cmp, label %loop, label %exit
-; CHECK: edge invoke.cont -> loop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge invoke.cont -> exit probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %invoke.cont -> %loop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %invoke.cont -> %exit probability is 0x04000000 / 0x80000000 = 3.12%
 
 lpad:
   %ll = landingpad { ptr, i32 }
@@ -524,11 +524,11 @@ declare void @cold() cold
 ; If loop has single exit and it leads to 'cold' block then edge leading to loop enter
 ; should be considered 'cold' as well.
 define void @test13() {
-; CHECK: edge entry -> loop probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK: edge entry -> exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK: edge loop -> loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge loop -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cold -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %loop probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK: edge %entry -> %exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK: edge %loop -> %loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %loop -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cold -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %loop, label %exit
@@ -548,12 +548,12 @@ exit:
 
 ; This is the same case as test13 but with additional loop 'preheader' block.
 define void @test14() {
-; CHECK: edge entry -> preheader probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK: edge entry -> exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK: edge preheader -> loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge loop -> loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge loop -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cold -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %preheader probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK: edge %entry -> %exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK: edge %preheader -> %loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %loop -> %loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %loop -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cold -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %preheader, label %exit
@@ -577,13 +577,13 @@ exit:
 ; If loop has multiple low probability exits then edge leading to loop enter
 ; should be considered low probable as well.
 define void @test15() {
-; CHECK: edge entry -> loop probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK: edge entry -> exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK: edge loop -> cont probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge loop -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK: edge cont -> loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge cont -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cold -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %loop probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK: edge %entry -> %exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK: edge %loop -> %cont probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %loop -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK: edge %cont -> %loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %cont -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cold -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %loop, label %exit
@@ -610,14 +610,14 @@ exit:
 
 ; This is the same case as test15 but with additional loop 'preheader' block.
 define void @test16() {
-; CHECK: edge entry -> preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge preheader -> loop probability is 0x078780e3 / 0x80000000 = 5.88%
-; CHECK: edge preheader -> exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-; CHECK: edge loop -> cont probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge loop -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK: edge cont -> loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge cont -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cold -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %preheader -> %loop probability is 0x078780e3 / 0x80000000 = 5.88%
+; CHECK: edge %preheader -> %exit probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+; CHECK: edge %loop -> %cont probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %loop -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK: edge %cont -> %loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %cont -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cold -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br label %preheader
@@ -650,16 +650,16 @@ declare void @abort() noreturn
 ; Check that 'preheader' has 50/50 probability since there is one 'normal' exit.
 ; Check that exit to 'cold' and 'noreturn' has lower probability than 'normal' exit.
 define void @test17() {
-; CHECK: edge entry -> preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge preheader -> loop probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge preheader -> exit probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge loop -> cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge loop -> noreturn probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge cont -> cont2 probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge cont -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cont2 -> loop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
-; CHECK: edge cont2 -> exit probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK: edge cold -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %preheader -> %loop probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %preheader -> %exit probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %loop -> %cont probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %loop -> %noreturn probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %cont -> %cont2 probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %cont -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cont2 -> %loop probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge]
+; CHECK: edge %cont2 -> %exit probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK: edge %cold -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 entry:
   br label %preheader
 
@@ -693,12 +693,12 @@ exit:
 ; This is case with two loops where one nested into another. Nested loop has
 ; low probable exit what encreases robability to take exit in the top level loop.
 define void @test18() {
-; CHECK: edge entry -> top.loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge top.loop -> loop probability is 0x546cd4b7 / 0x80000000 = 65.96%
-; CHECK: edge top.loop -> exit probability is 0x2b932b49 / 0x80000000 = 34.04%
-; CHECK: edge loop -> loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
-; CHECK: edge loop -> cold probability is 0x0041edfd / 0x80000000 = 0.20%
-; CHECK: edge cold -> top.loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %top.loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %top.loop -> %loop probability is 0x546cd4b7 / 0x80000000 = 65.96%
+; CHECK: edge %top.loop -> %exit probability is 0x2b932b49 / 0x80000000 = 34.04%
+; CHECK: edge %loop -> %loop probability is 0x7fbe1203 / 0x80000000 = 99.80% [HOT edge]
+; CHECK: edge %loop -> %cold probability is 0x0041edfd / 0x80000000 = 0.20%
+; CHECK: edge %cold -> %top.loop probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
  br label %top.loop 
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll b/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
index e4bcdfc082ff917..8db51024336c50e 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
@@ -8,8 +8,8 @@ define i32 @test1(i32 %a, i32 %b) {
 entry:
   %cond = icmp eq i32 %a, 42
   br i1 %cond, label %exit, label %abort
-; CHECK: edge entry -> exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge entry -> abort probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %abort probability is 0x00000800 / 0x80000000 = 0.00%
 
 abort:
   call void @abort() noreturn
@@ -26,11 +26,11 @@ entry:
                               i32 2, label %case_b
                               i32 3, label %case_c
                               i32 4, label %case_d]
-; CHECK: edge entry -> exit probability is 0x7fffe000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge entry -> case_a probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge entry -> case_b probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge entry -> case_c probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge entry -> case_d probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %exit probability is 0x7fffe000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %case_a probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %case_b probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %case_c probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %case_d probability is 0x00000800 / 0x80000000 = 0.00%
 
 case_a:
   br label %case_b
@@ -55,14 +55,14 @@ define i32 @test3(i32 %a, i32 %b) {
 entry:
   %cond1 = icmp eq i32 %a, 42
   br i1 %cond1, label %exit, label %dom
-; CHECK: edge entry -> exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge entry -> dom probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %dom probability is 0x00000800 / 0x80000000 = 0.00%
 
 dom:
   %cond2 = icmp ult i32 %a, 42
   br i1 %cond2, label %idom1, label %idom2
-; CHECK: edge dom -> idom1 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge dom -> idom2 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %dom -> %idom1 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %dom -> %idom2 probability is 0x40000000 / 0x80000000 = 50.00%
 
 idom1:
   br label %abort
@@ -84,8 +84,8 @@ define i32 @test4(i32 %a, i32 %b) {
 entry:
   %cond1 = icmp eq i32 %a, 42
   br i1 %cond1, label %header, label %exit
-; CHECK: edge entry -> header probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge entry -> exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %header probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
 
 header:
   br label %body
@@ -93,8 +93,8 @@ header:
 body:
   %cond2 = icmp eq i32 %a, 42
   br i1 %cond2, label %header, label %abort
-; CHECK: edge body -> header probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
-; CHECK: edge body -> abort probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %body -> %header probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %body -> %abort probability is 0x00000800 / 0x80000000 = 0.00%
 abort:
   call void @abort() noreturn
   unreachable
@@ -111,15 +111,15 @@ define i32 @throwSmallException(i32 %idx, i32 %limit) #0 personality ptr @__gxx_
 entry:
   %cmp = icmp sge i32 %idx, %limit
   br i1 %cmp, label %if.then, label %if.end
-; CHECK: edge entry -> if.then probability is 0x00000800 / 0x80000000 = 0.00%
-; CHECK: edge entry -> if.end probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %if.then probability is 0x00000800 / 0x80000000 = 0.00%
+; CHECK: edge %entry -> %if.end probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
 
 if.then:                                          ; preds = %entry
   %exception = call ptr @__cxa_allocate_exception(i64 1) #0
   invoke i32 @smallFunction(i32 %idx)
           to label %invoke.cont unwind label %lpad
-; CHECK: edge if.then -> invoke.cont probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK: edge if.then -> lpad probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.then -> %invoke.cont probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK: edge %if.then -> %lpad probability is 0x40000000 / 0x80000000 = 50.00%
 
 invoke.cont:                                      ; preds = %if.then
   call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null) #1
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll b/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
index 677c5fd9f777f73..d69f4a1ce2879f8 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
@@ -4,8 +4,8 @@
 ; calcLoopBranchHeuristics should return early without setting the weights.
 ; calcFloatingPointHeuristics, which is run later, sets the weights.
 ;
-; CHECK: edge while.body -> if.then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge while.body -> if.else probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %while.body -> %if.then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %while.body -> %if.else probability is 0x30000000 / 0x80000000 = 37.50%
 
 define void @foo1(i32 %n, ptr nocapture %b, ptr nocapture %c, ptr nocapture %d, ptr nocapture readonly %f0, ptr nocapture readonly %f1) {
 entry:
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll b/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
index d0fb64111d5ae19..ed851f29a6bfce8 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
@@ -4,8 +4,8 @@
 ; reflected in the probability computation because the weight is larger than
 ; the branch weight cap (about 2 billion).
 ;
-; CHECK: edge for.body -> if.then probability is 0x0cccba45 / 0x80000000 = 10.00%
-; CHECK: edge for.body -> if.else probability is 0x733345bb / 0x80000000 = 90.00% [HOT edge]
+; CHECK: edge %for.body -> %if.then probability is 0x0cccba45 / 0x80000000 = 10.00%
+; CHECK: edge %for.body -> %if.else probability is 0x733345bb / 0x80000000 = 90.00% [HOT edge]
 
 @y = common global i64 0, align 8
 @x = common global i64 0, align 8
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/switch.ll b/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
index 4254bc6225bdd1d..c2e6ae4b4a57a85 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
@@ -7,19 +7,19 @@ declare void @g(i32)
 ; returned by BranchProbabilityInfo::getEdgeProbability.
 
 define void @test1(i32 %x) {
-;CHECK: edge entry -> return probability is 0x0ccccccd / 0x80000000 = 10.00%
-;CHECK: edge entry -> bb0 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb0 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb0 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb1 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb1 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb1 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb2 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb2 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge entry -> bb2 probability is 0x26666666 / 0x80000000 = 30.00%
-;CHECK: edge bb0 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge bb1 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge bb2 -> return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %return probability is 0x0ccccccd / 0x80000000 = 10.00%
+;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
+;CHECK: edge %bb0 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %bb1 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %bb2 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   switch i32 %x, label %return [
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/unreachable.ll b/llvm/test/Analysis/BranchProbabilityInfo/unreachable.ll
index 0bec00237e82b9d..d3ada520c4dac94 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/unreachable.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/unreachable.ll
@@ -6,12 +6,12 @@ declare void @bar() cold
 ; 'unreachable' blocks. Check that 'cold' paths are preferred. Also ensure both
 ; paths from 'entry' block are equal.
 define void @test1(i32 %0) {
-;CHECK: edge entry -> l1 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge entry -> r1 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge l1 -> cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge l1 -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge r1 -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge r1 -> cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %l1 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %entry -> %r1 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %l1 -> %cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %l1 -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %r1 -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %r1 -> %cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %l1, label %r1
@@ -34,12 +34,12 @@ cold:
 ; 'unreachable' block. Check that 'l1' has 50/50 while 'r1' has 0/100
 ; distributuion. Also ensure both paths from 'entry' block are equal.
 define void @test2(i32 %0) {
-;CHECK: edge entry -> l1 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge entry -> r1 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge l1 -> cold probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge l1 -> cold2 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge r1 -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge r1 -> cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %l1 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %entry -> %r1 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %l1 -> %cold probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %l1 -> %cold2 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %r1 -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %r1 -> %cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %l1, label %r1
@@ -65,12 +65,12 @@ cold2:
 ; Both edges of 'r1' leads to 'unreachable' blocks while one edge of 'l1' leads to
 ; 'cold' block. Ensure that path leading to 'cold' block is preferred.
 define void @test3(i32 %0) {
-;CHECK: edge entry -> l1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge entry -> r1 probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge l1 -> cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge l1 -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
-;CHECK: edge r1 -> unreached probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge r1 -> unreached2 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %entry -> %l1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %r1 probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %l1 -> %cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %l1 -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %r1 -> %unreached probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %r1 -> %unreached2 probability is 0x40000000 / 0x80000000 = 50.00%
 
 entry:
   br i1 undef, label %l1, label %r1
@@ -96,13 +96,13 @@ cold:
 ; Check that we able to propagate 'cold' weight to 'entry' block. Also ensure
 ; both edges from 'l1' are equally likely.
 define void @test4(i32 %0) {
-;CHECK: edge entry -> l1 probability is 0x078780e3 / 0x80000000 = 5.88%
-;CHECK: edge entry -> r1 probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-;CHECK: edge l1 -> l2 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge l1 -> r2 probability is 0x40000000 / 0x80000000 = 50.00%
-;CHECK: edge l2 -> to.cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge r2 -> to.cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge to.cold -> cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %entry -> %l1 probability is 0x078780e3 / 0x80000000 = 5.88%
+;CHECK: edge %entry -> %r1 probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+;CHECK: edge %l1 -> %l2 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %l1 -> %r2 probability is 0x40000000 / 0x80000000 = 50.00%
+;CHECK: edge %l2 -> %to.cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %r2 -> %to.cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %to.cold -> %cold probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 entry:
   br i1 undef, label %l1, label %r1
@@ -129,11 +129,11 @@ cold:
 
 ; Check that most likely path from 'entry' to 'l2' through 'r1' is preferred.
 define void @test5(i32 %0) {
-;CHECK: edge entry -> cold probability is 0x078780e3 / 0x80000000 = 5.88%
-;CHECK: edge entry -> r1 probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
-;CHECK: edge cold -> l2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge r1 -> l2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-;CHECK: edge r1 -> unreached probability is 0x00000000 / 0x80000000 = 0.00%
+;CHECK: edge %entry -> %cold probability is 0x078780e3 / 0x80000000 = 5.88%
+;CHECK: edge %entry -> %r1 probability is 0x78787f1d / 0x80000000 = 94.12% [HOT edge]
+;CHECK: edge %cold -> %l2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %r1 -> %l2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+;CHECK: edge %r1 -> %unreached probability is 0x00000000 / 0x80000000 = 0.00%
 
 entry:
   br i1 undef, label %cold, label %r1
diff --git a/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll b/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
index 2f5a76b26c5bdea..ab4d6f6e66bc083 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
@@ -10,8 +10,8 @@ entry:
   %tmp1 = load i32, ptr @B, align 4
   br label %for.body
 
-; CHECK: edge for.body -> if.then probability is 0x30000000 / 0x80000000 = 37.50%
-; CHECK: edge for.body -> for.inc probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %for.body -> %if.then probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %for.body -> %for.inc probability is 0x50000000 / 0x80000000 = 62.50%
 for.body:
   %tmp4 = phi i32 [ %tmp1, %entry ], [ %tmp7, %for.inc ]
   %inc.iv = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
@@ -43,8 +43,8 @@ entry:
   %tmp1 = load i32, ptr @B, align 4
   br label %for.body
 
-; CHECK: edge for.body -> if.then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge for.body -> for.inc probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %for.body -> %if.then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %for.body -> %for.inc probability is 0x30000000 / 0x80000000 = 37.50%
 for.body:
   %tmp4 = phi i32 [ %tmp1, %entry ], [ %tmp7, %for.inc ]
   %inc.iv = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
@@ -76,8 +76,8 @@ entry:
   %tmp1 = load i32, ptr @B, align 4
   br label %for.body
 
-; CHECK: edge for.body -> if.then probability is 0x50000000 / 0x80000000 = 62.50%
-; CHECK: edge for.body -> for.inc probability is 0x30000000 / 0x80000000 = 37.50%
+; CHECK: edge %for.body -> %if.then probability is 0x50000000 / 0x80000000 = 62.50%
+; CHECK: edge %for.body -> %for.inc probability is 0x30000000 / 0x80000000 = 37.50%
 for.body:
   %tmp4 = phi i32 [ %tmp1, %entry ], [ %tmp7, %for.inc ]
   %inc.iv = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
diff --git a/llvm/test/Transforms/PGOProfile/indirectbr.ll b/llvm/test/Transforms/PGOProfile/indirectbr.ll
index c51d5cc0477cdb7..e6622bb947dc2ce 100644
--- a/llvm/test/Transforms/PGOProfile/indirectbr.ll
+++ b/llvm/test/Transforms/PGOProfile/indirectbr.ll
@@ -38,15 +38,15 @@ return:
 
 ; BRANCHPROB: Printing analysis {{.*}} for function 'foo':
 ; BRANCHPROB:---- Branch Probabilities ----
-; BRANCHPROB:  edge entry -> if.then probability is 0x37c32b17 / 0x80000000 = 43.56%
-; BRANCHPROB:  edge entry -> return.clone probability is 0x483cd4e9 / 0x80000000 = 56.44%
-; BRANCHPROB:  edge if.then -> return probability is 0x5ba2e8ba / 0x80000000 = 71.59%
-; BRANCHPROB:  edge if.then -> label2 probability is 0x1d1745d1 / 0x80000000 = 22.73%
-; BRANCHPROB:  edge if.then -> label3 probability is 0x0745d174 / 0x80000000 = 5.68%
-; BRANCHPROB:  edge label2 -> return.clone probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; BRANCHPROB:  edge label3 -> return.clone probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; BRANCHPROB:  edge return -> .split probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; BRANCHPROB:  edge return.clone -> .split probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; BRANCHPROB:  edge %entry -> %if.then probability is 0x37c32b17 / 0x80000000 = 43.56%
+; BRANCHPROB:  edge %entry -> %return.clone probability is 0x483cd4e9 / 0x80000000 = 56.44%
+; BRANCHPROB:  edge %if.then -> %return probability is 0x5ba2e8ba / 0x80000000 = 71.59%
+; BRANCHPROB:  edge %if.then -> %label2 probability is 0x1d1745d1 / 0x80000000 = 22.73%
+; BRANCHPROB:  edge %if.then -> %label3 probability is 0x0745d174 / 0x80000000 = 5.68%
+; BRANCHPROB:  edge %label2 -> %return.clone probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; BRANCHPROB:  edge %label3 -> %return.clone probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; BRANCHPROB:  edge %return -> %.split probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; BRANCHPROB:  edge %return.clone -> %.split probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 
 
diff --git a/llvm/test/Transforms/SampleProfile/branch.ll b/llvm/test/Transforms/SampleProfile/branch.ll
index 96bd2b1971d4f7b..ff5d8bbd5004f8d 100644
--- a/llvm/test/Transforms/SampleProfile/branch.ll
+++ b/llvm/test/Transforms/SampleProfile/branch.ll
@@ -49,8 +49,8 @@ entry:
   %0 = load i32, ptr %argc.addr, align 4, !dbg !21
   %cmp = icmp slt i32 %0, 2, !dbg !23
   br i1 %cmp, label %if.then, label %if.end, !dbg !24
-; CHECK:  edge entry -> if.then probability is 0x4ccf6b16 / 0x80000000 = 60.01%
-; CHECK:  edge entry -> if.end probability is 0x333094ea / 0x80000000 = 39.99%
+; CHECK:  edge %entry -> %if.then probability is 0x4ccf6b16 / 0x80000000 = 60.01%
+; CHECK:  edge %entry -> %if.end probability is 0x333094ea / 0x80000000 = 39.99%
 
 if.then:                                          ; preds = %entry
   store i32 1, ptr %retval, align 4, !dbg !25
@@ -67,8 +67,8 @@ if.end:                                           ; preds = %entry
   %3 = load i32, ptr %limit, align 4, !dbg !32
   %cmp1 = icmp sgt i32 %3, 100, !dbg !34
   br i1 %cmp1, label %if.then.2, label %if.else, !dbg !35
-; CHECK: edge if.end -> if.then.2 probability is 0x6652c748 / 0x80000000 = 79.94%
-; CHECK: edge if.end -> if.else probability is 0x19ad38b8 / 0x80000000 = 20.06%
+; CHECK: edge %if.end -> %if.then.2 probability is 0x6652c748 / 0x80000000 = 79.94%
+; CHECK: edge %if.end -> %if.else probability is 0x19ad38b8 / 0x80000000 = 20.06%
 
 if.then.2:                                        ; preds = %if.end
   call void @llvm.dbg.declare(metadata ptr %s, metadata !36, metadata !17), !dbg !38
@@ -88,10 +88,10 @@ for.cond:                                         ; preds = %for.inc, %if.then.2
   %7 = load i32, ptr %limit, align 4, !dbg !48
   %cmp5 = icmp slt i32 %6, %7, !dbg !49
   br i1 %cmp5, label %for.body, label %for.end, !dbg !50, !prof !80
-; CHECK: edge for.cond -> for.body probability is 0x73333333 / 0x80000000 = 90.00%
-; CHECK: edge for.cond -> for.end probability is 0x0ccccccd / 0x80000000 = 10.00%
-; OVW: edge for.cond -> for.body probability is 0x76b3f3be / 0x80000000 = 92.74% 
-; OVW: edge for.cond -> for.end probability is 0x094c0c42 / 0x80000000 = 7.26% 
+; CHECK: edge %for.cond -> %for.body probability is 0x73333333 / 0x80000000 = 90.00%
+; CHECK: edge %for.cond -> %for.end probability is 0x0ccccccd / 0x80000000 = 10.00%
+; OVW: edge %for.cond -> %for.body probability is 0x76b3f3be / 0x80000000 = 92.74% 
+; OVW: edge %for.cond -> %for.end probability is 0x094c0c42 / 0x80000000 = 7.26% 
 
 for.body:                                         ; preds = %for.cond
   call void @llvm.dbg.declare(metadata ptr %x, metadata !51, metadata !17), !dbg !53
diff --git a/llvm/test/Transforms/SampleProfile/calls.ll b/llvm/test/Transforms/SampleProfile/calls.ll
index e540a5bbea6459c..f9e8120aac1febb 100644
--- a/llvm/test/Transforms/SampleProfile/calls.ll
+++ b/llvm/test/Transforms/SampleProfile/calls.ll
@@ -47,8 +47,8 @@ while.cond:                                       ; preds = %if.end, %entry
   store i32 %inc, ptr %i, align 4, !dbg !14
   %cmp = icmp slt i32 %0, 400000000, !dbg !14
   br i1 %cmp, label %while.body, label %while.end, !dbg !14
-; CHECK: edge while.cond -> while.body probability is 0x77f2798d / 0x80000000 = 93.71% [HOT edge]
-; CHECK: edge while.cond -> while.end probability is 0x080d8673 / 0x80000000 = 6.29%
+; CHECK: edge %while.cond -> %while.body probability is 0x77f2798d / 0x80000000 = 93.71% [HOT edge]
+; CHECK: edge %while.cond -> %while.end probability is 0x080d8673 / 0x80000000 = 6.29%
 
 while.body:                                       ; preds = %while.cond
   %1 = load i32, ptr %i, align 4, !dbg !16
@@ -58,8 +58,8 @@ while.body:                                       ; preds = %while.cond
 ; both branches out of while.body had the same weight. In reality,
 ; the edge while.body->if.then is taken most of the time.
 ;
-; CHECK: edge while.body -> if.else probability is 0x0005b1e0 / 0x80000000 = 0.02%
-; CHECK: edge while.body -> if.then probability is 0x7ffa4e20 / 0x80000000 = 99.98% [HOT edge]
+; CHECK: edge %while.body -> %if.else probability is 0x0005b1e0 / 0x80000000 = 0.02%
+; CHECK: edge %while.body -> %if.then probability is 0x7ffa4e20 / 0x80000000 = 99.98% [HOT edge]
 
 
 if.then:                                          ; preds = %while.body
diff --git a/llvm/test/Transforms/SampleProfile/discriminator.ll b/llvm/test/Transforms/SampleProfile/discriminator.ll
index 4dd66cb6e98ee17..bc59ef6341076eb 100644
--- a/llvm/test/Transforms/SampleProfile/discriminator.ll
+++ b/llvm/test/Transforms/SampleProfile/discriminator.ll
@@ -34,15 +34,15 @@ while.cond:                                       ; preds = %if.end, %entry
   %0 = load i32, ptr %i.addr, align 4, !dbg !12
   %cmp = icmp slt i32 %0, 100, !dbg !12
   br i1 %cmp, label %while.body, label %while.end, !dbg !12
-; CHECK: edge while.cond -> while.body probability is 0x7d83ba68 / 0x80000000 = 98.06% [HOT edge]
-; CHECK: edge while.cond -> while.end probability is 0x027c4598 / 0x80000000 = 1.94%
+; CHECK: edge %while.cond -> %while.body probability is 0x7d83ba68 / 0x80000000 = 98.06% [HOT edge]
+; CHECK: edge %while.cond -> %while.end probability is 0x027c4598 / 0x80000000 = 1.94%
 
 while.body:                                       ; preds = %while.cond
   %1 = load i32, ptr %i.addr, align 4, !dbg !14
   %cmp1 = icmp slt i32 %1, 50, !dbg !14
   br i1 %cmp1, label %if.then, label %if.end, !dbg !14
-; CHECK: edge while.body -> if.then probability is 0x07878788 / 0x80000000 = 5.88%
-; CHECK: edge while.body -> if.end probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge]
+; CHECK: edge %while.body -> %if.then probability is 0x07878788 / 0x80000000 = 5.88%
+; CHECK: edge %while.body -> %if.end probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge]
 
 if.then:                                          ; preds = %while.body
   %2 = load i32, ptr %x, align 4, !dbg !17
diff --git a/llvm/test/Transforms/SampleProfile/fnptr.ll b/llvm/test/Transforms/SampleProfile/fnptr.ll
index c19337d2c420b11..55ee75e3353a484 100644
--- a/llvm/test/Transforms/SampleProfile/fnptr.ll
+++ b/llvm/test/Transforms/SampleProfile/fnptr.ll
@@ -5,12 +5,12 @@
 ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/fnptr.prof | opt -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/fnptr.binprof | opt -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
-; CHECK:   edge for.body3 -> if.then probability is 0x1a56a56a / 0x80000000 = 20.58%
-; CHECK:   edge for.body3 -> if.else probability is 0x65a95a96 / 0x80000000 = 79.42%
-; CHECK:   edge for.inc -> for.inc12 probability is 0x000fbd1c / 0x80000000 = 0.05%
-; CHECK:   edge for.inc -> for.body3 probability is 0x7ff042e4 / 0x80000000 = 99.95%
-; CHECK:   edge for.inc12 -> for.end14 probability is 0x04000000 / 0x80000000 = 3.12%
-; CHECK:   edge for.inc12 -> for.cond1.preheader probability is 0x7c000000 / 0x80000000 = 96.88%
+; CHECK:   edge %for.body3 -> %if.then probability is 0x1a56a56a / 0x80000000 = 20.58%
+; CHECK:   edge %for.body3 -> %if.else probability is 0x65a95a96 / 0x80000000 = 79.42%
+; CHECK:   edge %for.inc -> %for.inc12 probability is 0x000fbd1c / 0x80000000 = 0.05%
+; CHECK:   edge %for.inc -> %for.body3 probability is 0x7ff042e4 / 0x80000000 = 99.95%
+; CHECK:   edge %for.inc12 -> %for.end14 probability is 0x04000000 / 0x80000000 = 3.12%
+; CHECK:   edge %for.inc12 -> %for.cond1.preheader probability is 0x7c000000 / 0x80000000 = 96.88%
 
 ; Original C++ test case.
 ;
diff --git a/llvm/test/Transforms/SampleProfile/fsafdo_test.ll b/llvm/test/Transforms/SampleProfile/fsafdo_test.ll
index 19d78ecd98d84bd..4a35cb1e13a238f 100644
--- a/llvm/test/Transforms/SampleProfile/fsafdo_test.ll
+++ b/llvm/test/Transforms/SampleProfile/fsafdo_test.ll
@@ -13,7 +13,7 @@ define dso_local void @foo() #0 !dbg !29 {
 
 entry:
   br label %for.cond1.preheader, !dbg !30
-; CHECK: edge entry -> for.cond1.preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %entry -> %for.cond1.preheader probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 for.cond1.preheader:
   %j.012 = phi i32 [ 0, %entry ], [ %inc11, %if.end9.3 ]
@@ -22,29 +22,29 @@ for.cond1.preheader:
   %0 = and i32 %call, 1, !dbg !33
   %tobool.not = icmp eq i32 %0, 0, !dbg !33
   br i1 %tobool.not, label %if.end, label %if.then, !dbg !35
-; CHECK: edge for.cond1.preheader -> if.end probability is 0x3f6262b8 / 0x80000000 = 49.52%
-; CHECK: edge for.cond1.preheader -> if.then probability is 0x409d9d48 / 0x80000000 = 50.48%
+; CHECK: edge %for.cond1.preheader -> %if.end probability is 0x3f6262b8 / 0x80000000 = 49.52%
+; CHECK: edge %for.cond1.preheader -> %if.then probability is 0x409d9d48 / 0x80000000 = 50.48%
 
 
 if.then:
   %mul4 = shl nsw i32 %call, 1, !dbg !36
   tail call void @work(i32 %mul4), !dbg !37
   br label %if.end, !dbg !38
-; CHECK: edge if.then -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then -> %if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end:
   %1 = and i32 %call, 3, !dbg !39
   %tobool6.not = icmp eq i32 %1, 0, !dbg !39
   br i1 %tobool6.not, label %if.end9, label %if.then7, !dbg !40
-; CHECK: edge if.end -> if.end9 probability is 0x22c6bac3 / 0x80000000 = 27.17%
-; CHECK: edge if.end -> if.then7 probability is 0x5d39453d / 0x80000000 = 72.83%
+; CHECK: edge %if.end -> %if.end9 probability is 0x22c6bac3 / 0x80000000 = 27.17%
+; CHECK: edge %if.end -> %if.then7 probability is 0x5d39453d / 0x80000000 = 72.83%
 
 
 if.then7:
   %mul8 = mul nsw i32 %call, 3, !dbg !41
   tail call void @work(i32 %mul8), !dbg !42
   br label %if.end9, !dbg !43
-; CHECK: edge if.then7 -> if.end9 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then7 -> %if.end9 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end9:
   %add.1 = or i32 %mul, 1, !dbg !44
@@ -52,8 +52,8 @@ if.end9:
   %2 = and i32 %call.1, 1, !dbg !33
   %tobool.not.1 = icmp eq i32 %2, 0, !dbg !33
   br i1 %tobool.not.1, label %if.end.1, label %if.then.1, !dbg !35
-; CHECK: edge if.end9 -> if.end.1 probability is 0x3f6262b8 / 0x80000000 = 49.52%
-; CHECK: edge if.end9 -> if.then.1 probability is 0x409d9d48 / 0x80000000 = 50.48%
+; CHECK: edge %if.end9 -> %if.end.1 probability is 0x3f6262b8 / 0x80000000 = 49.52%
+; CHECK: edge %if.end9 -> %if.then.1 probability is 0x409d9d48 / 0x80000000 = 50.48%
 
 for.end12:
   ret void, !dbg !45
@@ -62,20 +62,20 @@ if.then.1:
   %mul4.1 = shl nsw i32 %call.1, 1, !dbg !36
   tail call void @work(i32 %mul4.1), !dbg !37
   br label %if.end.1, !dbg !38
-; CHECK: edge if.then.1 -> if.end.1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then.1 -> %if.end.1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end.1:
   %3 = and i32 %call.1, 3, !dbg !39
   %tobool6.not.1 = icmp eq i32 %3, 0, !dbg !39
   br i1 %tobool6.not.1, label %if.end9.1, label %if.then7.1, !dbg !40
-; CHECK: edge if.end.1 -> if.end9.1 probability is 0x22c6bac3 / 0x80000000 = 27.17%
-; CHECK: edge if.end.1 -> if.then7.1 probability is 0x5d39453d / 0x80000000 = 72.83%
+; CHECK: edge %if.end.1 -> %if.end9.1 probability is 0x22c6bac3 / 0x80000000 = 27.17%
+; CHECK: edge %if.end.1 -> %if.then7.1 probability is 0x5d39453d / 0x80000000 = 72.83%
 
 if.then7.1:
   %mul8.1 = mul nsw i32 %call.1, 3, !dbg !41
   tail call void @work(i32 %mul8.1), !dbg !42
   br label %if.end9.1, !dbg !43
-; CHECK: edge if.then7.1 -> if.end9.1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then7.1 -> %if.end9.1 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end9.1:
   %add.2 = or i32 %mul, 2, !dbg !44
@@ -83,27 +83,27 @@ if.end9.1:
   %4 = and i32 %call.2, 1, !dbg !33
   %tobool.not.2 = icmp eq i32 %4, 0, !dbg !33
   br i1 %tobool.not.2, label %if.end.2, label %if.then.2, !dbg !35
-; CHECK: edge if.end9.1 -> if.end.2 probability is 0x3f6262b8 / 0x80000000 = 49.52%
-; CHECK: edge if.end9.1 -> if.then.2 probability is 0x409d9d48 / 0x80000000 = 50.48%
+; CHECK: edge %if.end9.1 -> %if.end.2 probability is 0x3f6262b8 / 0x80000000 = 49.52%
+; CHECK: edge %if.end9.1 -> %if.then.2 probability is 0x409d9d48 / 0x80000000 = 50.48%
 
 if.then.2:
   %mul4.2 = shl nsw i32 %call.2, 1, !dbg !36
   tail call void @work(i32 %mul4.2), !dbg !37
   br label %if.end.2, !dbg !38
-; CHECK: edge if.then.2 -> if.end.2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then.2 -> %if.end.2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end.2:
   %5 = and i32 %call.2, 3, !dbg !39
   %tobool6.not.2 = icmp eq i32 %5, 0, !dbg !39
   br i1 %tobool6.not.2, label %if.end9.2, label %if.then7.2, !dbg !40
-; CHECK: edge if.end.2 -> if.end9.2 probability is 0x22c6bac3 / 0x80000000 = 27.17%
-; CHECK: edge if.end.2 -> if.then7.2 probability is 0x5d39453d / 0x80000000 = 72.83%
+; CHECK: edge %if.end.2 -> %if.end9.2 probability is 0x22c6bac3 / 0x80000000 = 27.17%
+; CHECK: edge %if.end.2 -> %if.then7.2 probability is 0x5d39453d / 0x80000000 = 72.83%
 
 if.then7.2:
   %mul8.2 = mul nsw i32 %call.2, 3, !dbg !41
   tail call void @work(i32 %mul8.2), !dbg !42
   br label %if.end9.2, !dbg !43
-; CHECK: edge if.then7.2 -> if.end9.2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then7.2 -> %if.end9.2 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end9.2:
   %add.3 = or i32 %mul, 3, !dbg !44
@@ -111,34 +111,34 @@ if.end9.2:
   %6 = and i32 %call.3, 1, !dbg !33
   %tobool.not.3 = icmp eq i32 %6, 0, !dbg !33
   br i1 %tobool.not.3, label %if.end.3, label %if.then.3, !dbg !35
-; CHECK: edge if.end9.2 -> if.end.3 probability is 0x3f6262b8 / 0x80000000 = 49.52%
-; CHECK: edge if.end9.2 -> if.then.3 probability is 0x409d9d48 / 0x80000000 = 50.48%
+; CHECK: edge %if.end9.2 -> %if.end.3 probability is 0x3f6262b8 / 0x80000000 = 49.52%
+; CHECK: edge %if.end9.2 -> %if.then.3 probability is 0x409d9d48 / 0x80000000 = 50.48%
 
 if.then.3:
   %mul4.3 = shl nsw i32 %call.3, 1, !dbg !36
   tail call void @work(i32 %mul4.3), !dbg !37
   br label %if.end.3, !dbg !38
-; CHECK: edge if.then.3 -> if.end.3 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then.3 -> %if.end.3 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end.3:
   %7 = and i32 %call.3, 3, !dbg !39
   %tobool6.not.3 = icmp eq i32 %7, 0, !dbg !39
   br i1 %tobool6.not.3, label %if.end9.3, label %if.then7.3, !dbg !40
-; CHECK: edge if.end.3 -> if.end9.3 probability is 0x22c6bac3 / 0x80000000 = 27.17%
-; CHECK: edge if.end.3 -> if.then7.3 probability is 0x5d39453d / 0x80000000 = 72.83%
+; CHECK: edge %if.end.3 -> %if.end9.3 probability is 0x22c6bac3 / 0x80000000 = 27.17%
+; CHECK: edge %if.end.3 -> %if.then7.3 probability is 0x5d39453d / 0x80000000 = 72.83%
 
 if.then7.3:
   %mul8.3 = mul nsw i32 %call.3, 3, !dbg !41
   tail call void @work(i32 %mul8.3), !dbg !42
   br label %if.end9.3, !dbg !43
-; CHECK: edge if.then7.3 -> if.end9.3 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK: edge %if.then7.3 -> %if.end9.3 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 
 if.end9.3:
   %inc11 = add nuw nsw i32 %j.012, 1, !dbg !46
   %exitcond.not = icmp eq i32 %inc11, 48, !dbg !48
   br i1 %exitcond.not, label %for.end12, label %for.cond1.preheader, !dbg !30, !llvm.loop !49
-; CHECK: edge if.end9.3 -> for.end12 probability is 0x00834dd9 / 0x80000000 = 0.40%
-; CHECK: edge if.end9.3 -> for.cond1.preheader probability is 0x7f7cb227 / 0x80000000 = 99.60% [HOT edge]
+; CHECK: edge %if.end9.3 -> %for.end12 probability is 0x00834dd9 / 0x80000000 = 0.40%
+; CHECK: edge %if.end9.3 -> %for.cond1.preheader probability is 0x7f7cb227 / 0x80000000 = 99.60% [HOT edge]
 }
 
 define dso_local i32 @main() #3 !dbg !52 {
diff --git a/llvm/test/Transforms/SampleProfile/offset.ll b/llvm/test/Transforms/SampleProfile/offset.ll
index bd1cbbe8c58a31b..0fdeb080cf942d0 100644
--- a/llvm/test/Transforms/SampleProfile/offset.ll
+++ b/llvm/test/Transforms/SampleProfile/offset.ll
@@ -28,8 +28,8 @@ entry:
   %0 = load i32, ptr %a.addr, align 4, !dbg !14
   %cmp = icmp sgt i32 %0, 0, !dbg !18
   br i1 %cmp, label %if.then, label %if.else, !dbg !19
-; CHECK: edge entry -> if.then probability is 0x0167ba82 / 0x80000000 = 1.10%
-; CHECK: edge entry -> if.else probability is 0x7e98457e / 0x80000000 = 98.90% [HOT edge]
+; CHECK: edge %entry -> %if.then probability is 0x0167ba82 / 0x80000000 = 1.10%
+; CHECK: edge %entry -> %if.else probability is 0x7e98457e / 0x80000000 = 98.90% [HOT edge]
 
 if.then:                                          ; preds = %entry
   store i32 10, ptr %retval, align 4, !dbg !20
diff --git a/llvm/test/Transforms/SampleProfile/profile-inference-even-count-distribution.ll b/llvm/test/Transforms/SampleProfile/profile-inference-even-count-distribution.ll
index b48bbf4ee4d50c5..407769a48701f2c 100644
--- a/llvm/test/Transforms/SampleProfile/profile-inference-even-count-distribution.ll
+++ b/llvm/test/Transforms/SampleProfile/profile-inference-even-count-distribution.ll
@@ -28,8 +28,8 @@ b11:
   call void @llvm.pseudoprobe(i64 7682762345278052905, i64 1, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b12, label %b13
-; CHECK:  edge b11 -> b12 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b11 -> b13 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b11 -> %b12 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b11 -> %b13 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b11: float = {{.*}}, int = {{.*}}, count = 1000
 
 b12:
@@ -73,8 +73,8 @@ b21:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 1, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b22, label %b23
-; CHECK:  edge b21 -> b22 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b21 -> b23 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b21 -> %b22 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b21 -> %b23 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b21: float = {{.*}}, int = {{.*}}, count = 1000
 
 b22:
@@ -130,15 +130,15 @@ b31:
 b32:
   call void @llvm.pseudoprobe(i64 -7908226060800700466, i64 2, i32 0, i64 -1)
   br i1 %cmp, label %b33, label %b34
-; CHECK:  edge b32 -> b33 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b32 -> b34 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b32 -> %b33 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b32 -> %b34 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b32: float = {{.*}}, int = {{.*}}, count = 1000
 
 b33:
   call void @llvm.pseudoprobe(i64 -7908226060800700466, i64 3, i32 0, i64 -1)
   br i1 %cmp, label %b35, label %b34
-; CHECK:  edge b33 -> b35 probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK:  edge b33 -> b34 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b33 -> %b35 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b33 -> %b34 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ; CHECK2: - b33: float = {{.*}}, int = {{.*}}, count = 500
 
 b34:
diff --git a/llvm/test/Transforms/SampleProfile/profile-inference-rebalance-large.ll b/llvm/test/Transforms/SampleProfile/profile-inference-rebalance-large.ll
index fb5b509087e4a5a..cd14d7cc63bee1d 100644
--- a/llvm/test/Transforms/SampleProfile/profile-inference-rebalance-large.ll
+++ b/llvm/test/Transforms/SampleProfile/profile-inference-rebalance-large.ll
@@ -41,11 +41,11 @@ b11:
     i32 3, label %b15
     i32 4, label %b16
   ]
-; CHECK:  edge b11 -> b12 probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK:  edge b11 -> b13 probability is 0x20000000 / 0x80000000 = 25.00%
-; CHECK:  edge b11 -> b14 probability is 0x20000000 / 0x80000000 = 25.00%
-; CHECK:  edge b11 -> b15 probability is 0x20000000 / 0x80000000 = 25.00%
-; CHECK:  edge b11 -> b16 probability is 0x20000000 / 0x80000000 = 25.00%
+; CHECK:  edge %b11 -> %b12 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b11 -> %b13 probability is 0x20000000 / 0x80000000 = 25.00%
+; CHECK:  edge %b11 -> %b14 probability is 0x20000000 / 0x80000000 = 25.00%
+; CHECK:  edge %b11 -> %b15 probability is 0x20000000 / 0x80000000 = 25.00%
+; CHECK:  edge %b11 -> %b16 probability is 0x20000000 / 0x80000000 = 25.00%
 ; CHECK2: - b11: float = {{.*}}, int = {{.*}}, count = 3300
 
 b12:
@@ -122,8 +122,8 @@ b21:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 1, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b22, label %b23
-; CHECK:  edge b21 -> b22 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK:  edge b21 -> b23 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b21 -> %b22 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b21 -> %b23 probability is 0x00000000 / 0x80000000 = 0.00%
 ; CHECK2: - b21: float = {{.*}}, int = {{.*}}, count = 128
 
 b22:
@@ -133,15 +133,15 @@ b22:
 b23:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 3, i32 0, i64 -1)
   br i1 %cmp, label %b24, label %b26
-; CHECK:  edge b23 -> b24 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
-; CHECK:  edge b23 -> b26 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b23 -> %b24 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b23 -> %b26 probability is 0x00000000 / 0x80000000 = 0.00%
 ; CHECK2: - b23: float = {{.*}}, int = {{.*}}, count = 128
 
 b24:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 4, i32 0, i64 -1)
   br i1 %cmp, label %b25, label %b26
-; CHECK:  edge b24 -> b25 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b24 -> b26 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b24 -> %b25 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b24 -> %b26 probability is 0x40000000 / 0x80000000 = 50.00%
 
 b25:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 5, i32 0, i64 -1)
@@ -156,8 +156,8 @@ b26:
 b27:
   call void @llvm.pseudoprobe(i64 2494702099028631698, i64 7, i32 0, i64 -1)
   br i1 %cmp, label %b28, label %b29
-; CHECK:  edge b27 -> b28 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b27 -> b29 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b27 -> %b28 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b27 -> %b29 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b27: float = {{.*}}, int = {{.*}}, count = 128
 
 b28:
@@ -220,8 +220,8 @@ b31:
 b32:
   call void @llvm.pseudoprobe(i64 -7908226060800700466, i64 2, i32 0, i64 -1)
   br i1 %cmp, label %b33, label %b34
-; CHECK:  edge b32 -> b33 probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK:  edge b32 -> b34 probability is 0x66666666 / 0x80000000 = 80.00%
+; CHECK:  edge %b32 -> %b33 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b32 -> %b34 probability is 0x66666666 / 0x80000000 = 80.00%
 ; CHECK2: - b32: float = {{.*}}, int = {{.*}}, count = 1500
 
 b33:
@@ -232,8 +232,8 @@ b33:
 b34:
   call void @llvm.pseudoprobe(i64 -7908226060800700466, i64 4, i32 0, i64 -1)
   br i1 %cmp, label %b35, label %b36
-; CHECK:  edge b34 -> b35 probability is 0x15555555 / 0x80000000 = 16.67%
-; CHECK:  edge b34 -> b36 probability is 0x6aaaaaab / 0x80000000 = 83.33% [HOT edge]
+; CHECK:  edge %b34 -> %b35 probability is 0x15555555 / 0x80000000 = 16.67%
+; CHECK:  edge %b34 -> %b36 probability is 0x6aaaaaab / 0x80000000 = 83.33% [HOT edge]
 ; CHECK2: - b34: float = {{.*}}, int = {{.*}}, count = 1200
 
 b35:
@@ -249,8 +249,8 @@ b36:
 b37:
   call void @llvm.pseudoprobe(i64 -7908226060800700466, i64 7, i32 0, i64 -1)
   br i1 %cmp, label %b38, label %b39
-; CHECK:  edge b37 -> b38 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b37 -> b39 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b37 -> %b38 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b37 -> %b39 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b37: float = {{.*}}, int = {{.*}}, count = 500
 
 b38:
@@ -310,8 +310,8 @@ b41:
   call void @llvm.pseudoprobe(i64 -6882312132165544686, i64 1, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b42, label %b43
-; CHECK:  edge b41 -> b42 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b41 -> b43 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b41 -> %b42 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b41 -> %b43 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b41: float = {{.*}}, int = {{.*}}, count = 400
 
 b42:
@@ -328,12 +328,12 @@ b43:
     i32 4, label %b47
     i32 5, label %b48
   ]
-; CHECK:  edge b43 -> b49 probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK:  edge b43 -> b44 probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK:  edge b43 -> b45 probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK:  edge b43 -> b46 probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK:  edge b43 -> b47 probability is 0x1999999a / 0x80000000 = 20.00%
-; CHECK:  edge b43 -> b48 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b43 -> %b49 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b43 -> %b44 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b43 -> %b45 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b43 -> %b46 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b43 -> %b47 probability is 0x1999999a / 0x80000000 = 20.00%
+; CHECK:  edge %b43 -> %b48 probability is 0x1999999a / 0x80000000 = 20.00%
 ; CHECK2: - b43: float = {{.*}}, int = {{.*}}, count = 400
 
 b44:
diff --git a/llvm/test/Transforms/SampleProfile/profile-inference-rebalance.ll b/llvm/test/Transforms/SampleProfile/profile-inference-rebalance.ll
index 9d38f8889396a6e..3fa9769e17a4493 100644
--- a/llvm/test/Transforms/SampleProfile/profile-inference-rebalance.ll
+++ b/llvm/test/Transforms/SampleProfile/profile-inference-rebalance.ll
@@ -66,8 +66,8 @@ b13:
 b14:
   call void @llvm.pseudoprobe(i64 -5758218299531803684, i64 4, i32 0, i64 -1)
   br i1 %cmp, label %b15, label %b16
-; CHECK:  edge b14 -> b15 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b14 -> b16 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b14 -> %b15 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b14 -> %b16 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b14: float = {{.*}}, int = {{.*}}, count = 65536
 
 b15:
@@ -83,8 +83,8 @@ b16:
 b17:
   call void @llvm.pseudoprobe(i64 -5758218299531803684, i64 7, i32 0, i64 -1)
   br i1 %cmp, label %b18, label %b19
-; CHECK:  edge b17 -> b18 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b17 -> b19 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b17 -> %b18 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b17 -> %b19 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b17: float = {{.*}}, int = {{.*}}, count = 65536
 
 b18:
@@ -139,34 +139,34 @@ b0:
   call void @llvm.pseudoprobe(i64 2506109673213838996, i64 1, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b1, label %b5
-; CHECK:  edge b0 -> b1 probability is 0x79e79e7a / 0x80000000 = 95.24% [HOT edge]
-; CHECK:  edge b0 -> b5 probability is 0x06186186 / 0x80000000 = 4.76%
+; CHECK:  edge %b0 -> %b1 probability is 0x79e79e7a / 0x80000000 = 95.24% [HOT edge]
+; CHECK:  edge %b0 -> %b5 probability is 0x06186186 / 0x80000000 = 4.76%
 ; CHECK2: - b0: float = {{.*}}, int = {{.*}}, count = 2100
 
 b1:
   call void @llvm.pseudoprobe(i64 2506109673213838996, i64 2, i32 0, i64 -1)
   br i1 %cmp, label %b2, label %b3
-; CHECK:  edge b1 -> b2 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b1 -> b3 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b1 -> %b2 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b1 -> %b3 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b1: float = {{.*}}, int = {{.*}}, count = 2000
 
 b2:
   call void @llvm.pseudoprobe(i64 2506109673213838996, i64 3, i32 0, i64 -1)
   br i1 %cmp, label %b3, label %b4
-; CHECK:  edge b2 -> b3 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b2 -> b4 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b2 -> %b3 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b2 -> %b4 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b2: float = {{.*}}, int = {{.*}}, count = 1000
 
 b3:
   call void @llvm.pseudoprobe(i64 2506109673213838996, i64 4, i32 0, i64 -1)
   br label %b5
-; CHECK:  edge b3 -> b5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b3 -> %b5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ; CHECK2: - b3: float = {{.*}}, int = {{.*}}, count = 1500
 
 b4:
   call void @llvm.pseudoprobe(i64 2506109673213838996, i64 5, i32 0, i64 -1)
   br label %b5
-; CHECK:  edge b4 -> b5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b4 -> %b5 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ; CHECK2: - b4: float = {{.*}}, int = {{.*}}, count = 500
 
 b5:
@@ -206,8 +206,8 @@ b32:
   call void @llvm.pseudoprobe(i64 -544905447084884130, i64 2, i32 0, i64 -1)
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b34, label %b33
-; CHECK:  edge b32 -> b34 probability is 0x00000000 / 0x80000000 = 0.00%
-; CHECK:  edge b32 -> b33 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK:  edge %b32 -> %b34 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b32 -> %b33 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ; CHECK2: - b32: float = {{.*}}, int = {{.*}}, count = 100
 
 b33:
@@ -261,8 +261,8 @@ b41:
 b42:
   call void @llvm.pseudoprobe(i64 -2989539179265513123, i64 3, i32 0, i64 -1)
   br i1 %cmp, label %b43, label %b44
-; CHECK:  edge b42 -> b43 probability is 0x40000000 / 0x80000000 = 50.00%
-; CHECK:  edge b42 -> b44 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b42 -> %b43 probability is 0x40000000 / 0x80000000 = 50.00%
+; CHECK:  edge %b42 -> %b44 probability is 0x40000000 / 0x80000000 = 50.00%
 ; CHECK2: - b42: float = {{.*}}, int = {{.*}}, count = 50
 
 b43:
diff --git a/llvm/test/Transforms/SampleProfile/profile-inference.ll b/llvm/test/Transforms/SampleProfile/profile-inference.ll
index 2a62dfd2c70759c..5ee15a2ad5fe99e 100644
--- a/llvm/test/Transforms/SampleProfile/profile-inference.ll
+++ b/llvm/test/Transforms/SampleProfile/profile-inference.ll
@@ -23,8 +23,8 @@ b1:
   %0 = load i32, ptr @yydebug, align 4
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b2, label %b3
-; CHECK:  edge b1 -> b2 probability is 0x4ccccccd / 0x80000000 = 60.00%
-; CHECK:  edge b1 -> b3 probability is 0x33333333 / 0x80000000 = 40.00%
+; CHECK:  edge %b1 -> %b2 probability is 0x4ccccccd / 0x80000000 = 60.00%
+; CHECK:  edge %b1 -> %b3 probability is 0x33333333 / 0x80000000 = 40.00%
 ; CHECK2: - b1: float = {{.*}}, int = {{.*}}, count = 100
 
 b2:
@@ -60,8 +60,8 @@ b1:
   %0 = load i32, ptr @yydebug, align 4
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b2, label %b3
-; CHECK:  edge b1 -> b2 probability is 0x73333333 / 0x80000000 = 90.00%
-; CHECK:  edge b1 -> b3 probability is 0x0ccccccd / 0x80000000 = 10.00%
+; CHECK:  edge %b1 -> %b2 probability is 0x73333333 / 0x80000000 = 90.00%
+; CHECK:  edge %b1 -> %b3 probability is 0x0ccccccd / 0x80000000 = 10.00%
 ; CHECK2: - b1: float = {{.*}}, int = {{.*}}, count = 100
 
 b2:
@@ -101,14 +101,14 @@ b1:
   %0 = load i32, ptr @yydebug, align 4
   %cmp = icmp ne i32 %0, 0
   br i1 %cmp, label %b2, label %b4
-; CHECK:  edge b1 -> b2 probability is 0x10505050 / 0x80000000 = 12.75%
-; CHECK:  edge b1 -> b4 probability is 0x6fafafb0 / 0x80000000 = 87.25%
+; CHECK:  edge %b1 -> %b2 probability is 0x10505050 / 0x80000000 = 12.75%
+; CHECK:  edge %b1 -> %b4 probability is 0x6fafafb0 / 0x80000000 = 87.25%
 ; CHECK2: - b1: float = {{.*}}, int = {{.*}}, count = 102
 
 b2:
   call void @llvm.pseudoprobe(i64 1649282507922421973, i64 2, i32 0, i64 -1)
   br label %b3
-; CHECK:  edge b2 -> b3 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b2 -> %b3 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b2: float = {{.*}}, int = {{.*}}, count = 13
 
 b3:
@@ -119,7 +119,7 @@ b3:
 b4:
   call void @llvm.pseudoprobe(i64 1649282507922421973, i64 4, i32 0, i64 -1)
   br label %b5
-; CHECK:  edge b4 -> b5 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b4 -> %b5 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b4: float = {{.*}}, int = {{.*}}, count = 89
 
 b5:
@@ -179,51 +179,51 @@ b1:
   %0 = load i32, ptr @yydebug, align 4
   %cmp = icmp ne i32 %0, 0
   br label %b2
-; CHECK:  edge b1 -> b2 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b1 -> %b2 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b1: float = {{.*}}, int = {{.*}}, count = 5993
 
 b2:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 2, i32 0, i64 -1)
   br i1 %cmp, label %b4, label %b3
-; CHECK:  edge b2 -> b4 probability is 0x7ffa8844 / 0x80000000 = 99.98%
-; CHECK:  edge b2 -> b3 probability is 0x000577bc / 0x80000000 = 0.02%
+; CHECK:  edge %b2 -> %b4 probability is 0x7ffa8844 / 0x80000000 = 99.98%
+; CHECK:  edge %b2 -> %b3 probability is 0x000577bc / 0x80000000 = 0.02%
 ; CHECK2: - b2: float = {{.*}}, int = {{.*}}, count = 5993
 
 b3:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 3, i32 0, i64 -1)
   br label %b9
-; CHECK:  edge b3 -> b9 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b3 -> %b9 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b3: float = {{.*}}, int = {{.*}}, count = 1
 
 b4:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 4, i32 0, i64 -1)
   br i1 %cmp, label %b5, label %b6
-; CHECK:  edge b4 -> b5 probability is 0x80000000 / 0x80000000 = 100.00%
-; CHECK:  edge b4 -> b6 probability is 0x00000000 / 0x80000000 = 0.00%
+; CHECK:  edge %b4 -> %b5 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b4 -> %b6 probability is 0x00000000 / 0x80000000 = 0.00%
 ; CHECK2: - b4: float = {{.*}}, int = {{.*}}, count = 5992
 
 b5:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 5, i32 0, i64 -1)
   br label %b7
-; CHECK:  edge b5 -> b7 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b5 -> %b7 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b5: float = {{.*}}, int = {{.*}}, count = 5992
 
 b6:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 6, i32 0, i64 -1)
   br label %b8
-; CHECK:  edge b6 -> b8 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b6 -> %b8 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b6: float = {{.*}}, int = {{.*}}, count = 0
 
 b7:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 7, i32 0, i64 -1)
   br label %b8
-; CHECK:  edge b7 -> b8 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b7 -> %b8 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b7: float = {{.*}}, int = {{.*}}, count = 5992
 
 b8:
   call void @llvm.pseudoprobe(i64 -907520326213521421, i64 8, i32 0, i64 -1)
   br label %b9
-; CHECK:  edge b8 -> b9 probability is 0x80000000 / 0x80000000 = 100.00%
+; CHECK:  edge %b8 -> %b9 probability is 0x80000000 / 0x80000000 = 100.00%
 ; CHECK2: - b8: float = {{.*}}, int = {{.*}}, count = 5992
 
 b9:
diff --git a/llvm/test/Transforms/SampleProfile/propagate.ll b/llvm/test/Transforms/SampleProfile/propagate.ll
index d419e717728d1cd..ece85a8f8b3191f 100644
--- a/llvm/test/Transforms/SampleProfile/propagate.ll
+++ b/llvm/test/Transforms/SampleProfile/propagate.ll
@@ -84,8 +84,8 @@ for.body:                                         ; preds = %for.cond
   %div = sdiv i64 %7, 3, !dbg !43
   %cmp2 = icmp sgt i64 %6, %div, !dbg !44
   br i1 %cmp2, label %if.then3, label %if.end, !dbg !45
-; CHECK:  edge for.body -> if.then3 probability is 0x51292fa6 / 0x80000000 = 63.41%
-; CHECK:  edge for.body -> if.end probability is 0x2ed6d05a / 0x80000000 = 36.59%
+; CHECK:  edge %for.body -> %if.then3 probability is 0x51292fa6 / 0x80000000 = 63.41%
+; CHECK:  edge %for.body -> %if.end probability is 0x2ed6d05a / 0x80000000 = 36.59%
 
 if.then3:                                         ; preds = %for.body
   %8 = load i32, ptr %x.addr, align 4, !dbg !46
@@ -99,8 +99,8 @@ if.end:                                           ; preds = %if.then3, %for.body
   %div4 = sdiv i64 %10, 4, !dbg !51
   %cmp5 = icmp sgt i64 %9, %div4, !dbg !52
   br i1 %cmp5, label %if.then6, label %if.else7, !dbg !53
-; CHECK:  edge if.end -> if.then6 probability is 0x5d89d89e / 0x80000000 = 73.08%
-; CHECK:  edge if.end -> if.else7 probability is 0x22762762 / 0x80000000 = 26.92%
+; CHECK:  edge %if.end -> %if.then6 probability is 0x5d89d89e / 0x80000000 = 73.08%
+; CHECK:  edge %if.end -> %if.else7 probability is 0x22762762 / 0x80000000 = 26.92%
 
 if.then6:                                         ; preds = %if.end
   %11 = load i32, ptr %y.addr, align 4, !dbg !54
@@ -120,8 +120,8 @@ for.cond8:                                        ; preds = %for.inc, %if.else7
   %13 = load i64, ptr %j, align 8, !dbg !64
   %cmp9 = icmp slt i64 %13, 100, !dbg !67
   br i1 %cmp9, label %for.body10, label %for.end, !dbg !68
-; CHECK: edge for.cond8 -> for.body10 probability is 0x7e941a89 / 0x80000000 = 98.89% [HOT edge]
-; CHECK: edge for.cond8 -> for.end probability is 0x016be577 / 0x80000000 = 1.11%
+; CHECK: edge %for.cond8 -> %for.body10 probability is 0x7e941a89 / 0x80000000 = 98.89% [HOT edge]
+; CHECK: edge %for.cond8 -> %for.end probability is 0x016be577 / 0x80000000 = 1.11%
 
 
 for.body10:                                       ; preds = %for.cond8
diff --git a/llvm/test/Transforms/SampleProfile/remap.ll b/llvm/test/Transforms/SampleProfile/remap.ll
index 090f4b3fde3a65c..ffb57e23a735c22 100644
--- a/llvm/test/Transforms/SampleProfile/remap.ll
+++ b/llvm/test/Transforms/SampleProfile/remap.ll
@@ -14,8 +14,8 @@ define void @_ZN3foo3barERKN1M1XINS_6detail3quxEEE() #0 !dbg !2 {
 entry:
   %cmp = call i1 @foo(), !dbg !6
   br i1 %cmp, label %if.then, label %if.end
-; CHECK:  edge entry -> if.then probability is 0x4ccf6b16 / 0x80000000 = 60.01%
-; CHECK:  edge entry -> if.end probability is 0x333094ea / 0x80000000 = 39.99%
+; CHECK:  edge %entry -> %if.then probability is 0x4ccf6b16 / 0x80000000 = 60.01%
+; CHECK:  edge %entry -> %if.end probability is 0x333094ea / 0x80000000 = 39.99%
 
 if.then:
   br label %return
@@ -23,8 +23,8 @@ if.then:
 if.end:
   %cmp1 = call i1 @foo(), !dbg !7
   br i1 %cmp1, label %if.then.2, label %if.else
-; CHECK: edge if.end -> if.then.2 probability is 0x6652c748 / 0x80000000 = 79.94%
-; CHECK: edge if.end -> if.else probability is 0x19ad38b8 / 0x80000000 = 20.06%
+; CHECK: edge %if.end -> %if.then.2 probability is 0x6652c748 / 0x80000000 = 79.94%
+; CHECK: edge %if.end -> %if.else probability is 0x19ad38b8 / 0x80000000 = 20.06%
 
 if.then.2:
   call i1 @foo(), !dbg !8
@@ -33,8 +33,8 @@ if.then.2:
 for.cond:
   %cmp5 = call i1 @foo()
   br i1 %cmp5, label %for.body, label %for.end, !prof !9
-; CHECK: edge for.cond -> for.body probability is 0x73333333 / 0x80000000 = 90.00%
-; CHECK: edge for.cond -> for.end probability is 0x0ccccccd / 0x80000000 = 10.00%
+; CHECK: edge %for.cond -> %for.body probability is 0x73333333 / 0x80000000 = 90.00%
+; CHECK: edge %for.cond -> %for.end probability is 0x0ccccccd / 0x80000000 = 10.00%
 
 for.body:
   br label %for.cond
diff --git a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/branch-probability-analysis.ll.expected b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/branch-probability-analysis.ll.expected
index e2f26a7052f182c..03014498724fdce 100644
--- a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/branch-probability-analysis.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/branch-probability-analysis.ll.expected
@@ -4,7 +4,7 @@
 define void @test1() {
 ; CHECK-LABEL: 'test1'
 ; CHECK-NEXT:  ---- Branch Probabilities ----
-; CHECK-NEXT:    edge entry -> exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
+; CHECK-NEXT:    edge %entry -> %exit probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
 ;
 entry:
   br label %exit



More information about the flang-commits mailing list