[llvm] [VPlan] Use BlockFrequencyInfo's full mass for execution frequencies. (PR #227006)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 07:49:41 PDT 2026


https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/227006

Use BlockFrequencyInfo's full mass instead of custom 2^63 for "always execute".

This updates VPlan's block frequencies to match BFI.

>From d5faa37fc114d8da7434f7c89f3356e82cbafcef Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Sat, 26 Sep 2026 07:33:00 +0100
Subject: [PATCH] [VPlan] Use BlockFrequencyInfo's full mass for execution
 frequencies.

Use BlockFrequencyInfo's full mass instead of custom 2^63 for "always
execute".

This updates VPlan's block frequencies to match BFI.
---
 .../lib/Transforms/Vectorize/VPlanRecipes.cpp |   9 +-
 llvm/lib/Transforms/Vectorize/VPlanUtils.cpp  |   7 +-
 llvm/lib/Transforms/Vectorize/VPlanUtils.h    |   7 +-
 .../VPlan/execution-frequencies-match-bfi.ll  | 178 +++++++++---------
 .../VPlan/record-execution-frequencies.ll     |  22 +--
 .../VPlan/vplan-based-stride-mv.ll            |   6 +-
 .../VPlan/vplan-printing-branch-weights.ll    |  10 +-
 7 files changed, 119 insertions(+), 120 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 26ef4bf369c17..2a6349dd670db 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -22,6 +22,7 @@
 #include "llvm/ADT/SmallVectorExtras.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Analysis/AssumptionCache.h"
+#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
 #include "llvm/Analysis/IVDescriptors.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -2117,7 +2118,7 @@ static VPExecutionFrequency getExecutionFrequencyFromMD(const MDNode *Node) {
   assert(Node->getNumOperands() <= 2 && "unexpected frequency node shape");
   uint64_t Freq =
       mdconst::extract<ConstantInt>(Node->getOperand(0))->getZExtValue();
-  assert(Freq <= vputils::AlwaysExecutesFreq &&
+  assert(Freq <= BlockFrequencyInfoImplBase::BlockMass::getFull().getMass() &&
          "frequency cannot exceed the one of an always executing block");
   return {BlockFrequency(Freq), Node->getNumOperands() == 2};
 }
@@ -2125,7 +2126,7 @@ static VPExecutionFrequency getExecutionFrequencyFromMD(const MDNode *Node) {
 void VPIRMetadata::setExecutionFrequency(
     std::optional<VPExecutionFrequency> Freq, LLVMContext &Ctx) {
   // A recipe that always executes needs no annotation.
-  if (!Freq || Freq->Freq.getFrequency() == vputils::AlwaysExecutesFreq)
+  if (!Freq || vputils::getExecutionProbability(Freq->Freq).isOne())
     return;
   SmallVector<llvm::Metadata *, 2> Ops = {ConstantAsMetadata::get(
       ConstantInt::get(Type::getInt64Ty(Ctx), Freq->Freq.getFrequency()))};
@@ -2189,8 +2190,10 @@ void VPIRMetadata::print(raw_ostream &O, VPSlotTracker &SlotTracker) const {
       // Print the frequency together with the probability it corresponds to.
       auto [Freq, IsEstimated] = getExecutionFrequencyFromMD(Node);
       const fltSemantics &Sem = APFloat::IEEEdouble();
+      uint64_t Full =
+          BlockFrequencyInfoImplBase::BlockMass::getFull().getMass();
       APFloat Percent = APFloat(Sem, Freq.getFrequency()) * APFloat(Sem, 100) /
-                        APFloat(Sem, vputils::AlwaysExecutesFreq);
+                        APFloat(Sem, Full);
       SmallString<16> PercentStr;
       Percent.toString(PercentStr, /*FormatPrecision=*/4);
       O << Freq.getFrequency() << " (" << PercentStr << "%"
diff --git a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
index c7d551aa332f8..599bfadc91958 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
@@ -1211,8 +1211,9 @@ static BranchProbability getBranchProbabilityKeepingPartial(uint64_t Num,
 }
 
 BranchProbability vputils::getExecutionProbability(BlockFrequency Freq) {
-  return getBranchProbabilityKeepingPartial(Freq.getFrequency(),
-                                            AlwaysExecutesFreq);
+  return getBranchProbabilityKeepingPartial(
+      Freq.getFrequency(),
+      BlockFrequencyInfoImplBase::BlockMass::getFull().getMass());
 }
 
 /// Returns the probability of reaching each unique successor of \p VPBB, taken
@@ -1267,7 +1268,7 @@ vputils::computeExecutionFrequencies(ArrayRef<VPBasicBlock *> Blocks) {
     BFI.Working.emplace_back(BFIBase::BlockNode(Idx)).Loop = &Loop;
   }
   BFI.Working.emplace_back(Outside);
-  BFI.Working[Header.Index].getMass() = BFIBase::BlockMass(AlwaysExecutesFreq);
+  BFI.Working[Header.Index].getMass() = BFIBase::BlockMass::getFull();
 
   // Keep track nodes reached via an edge without branch weighs or with
   // estimated ones
diff --git a/llvm/lib/Transforms/Vectorize/VPlanUtils.h b/llvm/lib/Transforms/Vectorize/VPlanUtils.h
index 967e612ab7114..c046239e2f983 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUtils.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanUtils.h
@@ -227,12 +227,7 @@ VPIRValue *tryToFoldLiveIns(VPSingleDefRecipe &R, ArrayRef<VPValue *> Operands,
 LLVM_ABI_FOR_TEST VPValue *
 reconstructSSA(VPBasicBlock *VPBB, DenseMap<VPBasicBlock *, VPValue *> &Defs);
 
-/// Denominator of the frequencies computed by computeExecutionFrequencies, i.e.
-/// the frequency of a block that always executes. Wider than
-/// BranchProbability's 31-bit one, which truncates rarely executed blocks to 0.
-inline constexpr uint64_t AlwaysExecutesFreq = 1ULL << 63;
-
-/// Returns \p Freq as a BranchProbability, relative to AlwaysExecutesFreq.
+/// Returns \p Freq as a BranchProbability, relative to the full mass.
 BranchProbability getExecutionProbability(BlockFrequency Freq);
 
 /// Computes for each block in \p Blocks, which must be in reverse post-order,
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/execution-frequencies-match-bfi.ll b/llvm/test/Transforms/LoopVectorize/VPlan/execution-frequencies-match-bfi.ll
index 27a86f1123160..13fcd1102c12a 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/execution-frequencies-match-bfi.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/execution-frequencies-match-bfi.ll
@@ -34,8 +34,8 @@ define void @single_pred(ptr noalias %a, ptr noalias %b, ptr noalias %idx) {
 ; VPLAN-NEXT:  Successor(s): if.then, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -97,8 +97,8 @@ define void @single_pred_zero_weight(ptr noalias %a, ptr noalias %b, ptr noalias
 ; VPLAN-NEXT:  Successor(s): if.then, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 8589934591 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -160,8 +160,8 @@ define void @single_pred_zero_weight_sibling(ptr noalias %a, ptr noalias %b, ptr
 ; VPLAN-NEXT:  Successor(s): if.then, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 9223372032559808512 (100%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 9223372032559808512 (100%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 18446744065119617023 (100%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 18446744065119617023 (100%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -225,20 +225,20 @@ define void @two_preds(ptr noalias %a, ptr noalias %b, ptr noalias %c, ptr noali
 ; VPLAN-NEXT:  Successor(s): then, else
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  else:
-; VPLAN-NEXT:    EMIT ir<%gep.c> = getelementptr inbounds ir<%c>, ir<%iv> (!vplan.execution.frequency 6917529027641081856 (75%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.c> (!vplan.execution.frequency 6917529027641081856 (75%))
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp slt ir<%i>, ir<-100> (!vplan.execution.frequency 6917529027641081856 (75%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 2}, !vplan.execution.frequency 6917529027641081856 (75%))
+; VPLAN-NEXT:    EMIT ir<%gep.c> = getelementptr inbounds ir<%c>, ir<%iv> (!vplan.execution.frequency 13835058055282163711 (75%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.c> (!vplan.execution.frequency 13835058055282163711 (75%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp slt ir<%i>, ir<-100> (!vplan.execution.frequency 13835058055282163711 (75%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 2}, !vplan.execution.frequency 13835058055282163711 (75%))
 ; VPLAN-NEXT:  Successor(s): merge, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4611686018427387904 (25%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387904 (25%))
 ; VPLAN-NEXT:  Successor(s): merge
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  merge:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4611686019501129728 (50%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 4611686019501129728 (50%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 9223372039002259455 (50%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 9223372039002259455 (50%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -308,15 +308,15 @@ define void @nested_ifs(ptr noalias %a, ptr noalias %b, ptr noalias %idx) {
 ; VPLAN-NEXT:  Successor(s): if.0, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.0:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp slt ir<%i>, ir<100> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 1}, !vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp slt ir<%i>, ir<100> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 1}, !vplan.execution.frequency 4611686018427387903 (25%))
 ; VPLAN-NEXT:  Successor(s): if.1, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.1:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 1152921504606846976 (12.5%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 1152921504606846976 (12.5%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693951 (12.5%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693951 (12.5%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -377,8 +377,8 @@ define void @second_branch_without_weights(ptr noalias %a, ptr noalias %b, ptr n
 ;
 ; VPLAN-LABEL: VPlan for loop in 'second_branch_without_weights'
 ; VPLAN:       if.then.1:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; VPLAN-NEXT:  Successor(s): merge
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  merge:
@@ -386,8 +386,8 @@ define void @second_branch_without_weights(ptr noalias %a, ptr noalias %b, ptr n
 ; VPLAN-NEXT:  Successor(s): if.then.2, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then.2:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 5764607523034234880 (62.5%, estimated))
-; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 5764607523034234880 (62.5%, estimated))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 11529215046068469759 (62.5%, estimated))
+; VPLAN-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 11529215046068469759 (62.5%, estimated))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -450,18 +450,18 @@ define void @switch_common_dest(ptr noalias %a, ptr noalias %b, ptr noalias %c,
 ; VPLAN-NEXT:  Successor(s): default, if.then, if.then, other
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  other:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 1152921504606846976 (12.5%))
-; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.b> (!vplan.execution.frequency 1152921504606846976 (12.5%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 2305843009213693951 (12.5%))
+; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.b> (!vplan.execution.frequency 2305843009213693951 (12.5%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 3458764514357411840 (37.5%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 3458764514357411840 (37.5%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 6917529028714823680 (37.5%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 6917529028714823680 (37.5%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  default:
-; VPLAN-NEXT:    EMIT ir<%gep.c> = getelementptr inbounds ir<%c>, ir<%iv> (!vplan.execution.frequency 4611686017890516992 (50%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.c> (!vplan.execution.frequency 4611686017890516992 (50%))
+; VPLAN-NEXT:    EMIT ir<%gep.c> = getelementptr inbounds ir<%c>, ir<%iv> (!vplan.execution.frequency 9223372035781033984 (50%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.c> (!vplan.execution.frequency 9223372035781033984 (50%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -534,13 +534,13 @@ define void @switch_common_dest_weight_sum_not_a_power_of_two(ptr noalias %a, pt
 ; VPLAN-NEXT:  Successor(s): default, if.then, if.then
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 6148914689804861440 (66.67%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 6148914689804861440 (66.67%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 12297829379609722879 (66.67%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 12297829379609722879 (66.67%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  default:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 3074457347049914368 (33.33%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 3074457347049914368 (33.33%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 6148914694099828736 (33.33%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 6148914694099828736 (33.33%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -606,13 +606,13 @@ define void @switch_common_dest_almost_always_taken(ptr noalias %a, ptr noalias
 ; VPLAN-NEXT:  Successor(s): default, if.then, if.then
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 9223372032559808512 (100%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 9223372032559808512 (100%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 18446744065119617023 (100%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 18446744065119617023 (100%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  default:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 8589934592 (4.657E-8%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 8589934592 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -681,14 +681,14 @@ define void @switch_common_dest_almost_never_taken(ptr noalias %a, ptr noalias %
 ; VPLAN-NEXT:  Successor(s): mid, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  mid:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT switch ir<%l>, ir<1>, ir<2>, ir<3>, ir<4> (!prof {1, 1, 1, 1, 1}, !vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT switch ir<%l>, ir<1>, ir<2>, ir<3>, ir<4> (!prof {1, 1, 1, 1, 1}, !vplan.execution.frequency 8589934591 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch, if.then, if.then, if.then, if.then
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 3435973836 (3.725E-8%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 3435973836 (3.725E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 6871947671 (3.725E-8%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 6871947671 (3.725E-8%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -759,14 +759,14 @@ define void @switch_common_dest_many_edges_almost_never_taken(ptr noalias %a, pt
 ; VPLAN-NEXT:  Successor(s): mid, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  mid:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT switch ir<%l>, ir<1>, ir<2>, ir<3>, ir<4>, ir<5>, ir<6>, ir<7>, ir<8> (!prof {1, 1, 1, 1, 1, 1, 1, 1, 1}, !vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT switch ir<%l>, ir<1>, ir<2>, ir<3>, ir<4>, ir<5>, ir<6>, ir<7>, ir<8> (!prof {1, 1, 1, 1, 1, 1, 1, 1, 1}, !vplan.execution.frequency 8589934591 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch, if.then, if.then, if.then, if.then, if.then, if.then, if.then, if.then
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 3817748708 (4.139E-8%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 3817748708 (4.139E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 7635497415 (4.139E-8%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 7635497415 (4.139E-8%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
@@ -839,8 +839,8 @@ define void @switch_common_dest_weight_sum_exceeds_32_bits(ptr noalias %a, ptr n
 ; VPLAN-NEXT:  Successor(s): latch, if.then, if.then, if.then, if.then, if.then
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 9223372023969873920 (100%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 9223372023969873920 (100%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 18446744047939747839 (100%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 18446744047939747839 (100%))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -891,8 +891,8 @@ define void @switch_many_edges_to_latch(ptr noalias %a, ptr noalias %idx) {
 ;
 ; VPLAN-LABEL: VPlan for loop in 'switch_many_edges_to_latch'
 ; VPLAN:       if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 7535434672457646080 (81.7%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 7535434672457646080 (81.7%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 15070869344915292159 (81.7%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 15070869344915292159 (81.7%))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -972,13 +972,13 @@ define void @switch_weights_clamped_at_both_ends(ptr noalias %a, ptr noalias %b,
 ;
 ; VPLAN-LABEL: VPlan for loop in 'switch_weights_clamped_at_both_ends'
 ; VPLAN:       if.then:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 9223372032559808512 (100%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 9223372032559808512 (100%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 18446744065119617023 (100%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 18446744065119617023 (100%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  default:
-; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 8589934592 (4.657E-8%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.b> (!vplan.execution.frequency 8589934592 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -1019,7 +1019,7 @@ define void @nested_blocks_almost_never_entered(ptr noalias %a, ptr noalias %idx
 ;   %loop          1 =        1
 ;   %if.then.1 2^-31 ~ 4.66e-10
 ;   %if.then.2 2^-62 ~ 2.17e-19
-;   %if.then.3 2^-63 ~ 1.08e-19  (clamped up from 2^-93)
+;   %if.then.3 2^-64 ~ 5.42e-20  (clamped up from 2^-93)
 ;   %latch         1 =        1
 ;
 ; BFI-LABEL: block-frequency-info: nested_blocks_almost_never_entered
@@ -1033,18 +1033,18 @@ define void @nested_blocks_almost_never_entered(ptr noalias %a, ptr noalias %idx
 ;
 ; VPLAN-LABEL: VPlan for loop in 'nested_blocks_almost_never_entered'
 ; VPLAN:       if.then.1:
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%l>, ir<1> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 2147483647}, !vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%l>, ir<1> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 2147483647}, !vplan.execution.frequency 8589934591 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): if.then.2, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then.2:
-; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%l>, ir<2> (!vplan.execution.frequency 2 (2.168E-17%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1, 2147483647}, !vplan.execution.frequency 2 (2.168E-17%))
+; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%l>, ir<2> (!vplan.execution.frequency 3 (1.626E-17%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1, 2147483647}, !vplan.execution.frequency 3 (1.626E-17%))
 ; VPLAN-NEXT:  Successor(s): if.then.3, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then.3:
-; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 1 (1.084E-17%))
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 1 (1.084E-17%))
+; VPLAN-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 1 (5.421E-18%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 1 (5.421E-18%))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -1100,11 +1100,11 @@ define void @switch_join_always(ptr noalias %a, ptr noalias %idx) {
 ;
 ; VPLAN-LABEL: VPlan for loop in 'switch_join_always'
 ; VPLAN:       case.2:
-; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 1317624575466405888 (14.29%))
+; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 2635249150932811775 (14.29%))
 ; VPLAN-NEXT:  Successor(s): join
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  case.1:
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 1317624575670928140 (14.29%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 2635249151341856280 (14.29%))
 ; VPLAN-NEXT:  Successor(s): join
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  join:
@@ -1179,9 +1179,9 @@ define void @all_zero_weights(ptr noalias %a, ptr noalias %idx) {
 ;
 ; VPLAN-LABEL: VPlan for loop in 'all_zero_weights'
 ; VPLAN:       if.then:
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387904 (50%))
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 4611686018427387904 (50%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {0, 0}, !vplan.execution.frequency 4611686018427387904 (50%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 9223372036854775807 (50%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 9223372036854775807 (50%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {0, 0}, !vplan.execution.frequency 9223372036854775807 (50%))
 ; VPLAN-NEXT:  Successor(s): if.then.2, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.then.2:
@@ -1251,13 +1251,13 @@ define void @estimated_through_weighted_branch(ptr noalias %a, ptr noalias %idx)
 ;
 ; VPLAN-LABEL: VPlan for loop in 'estimated_through_weighted_branch'
 ; VPLAN:       outer.then:
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 5764607523034234880 (62.5%, estimated))
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 5764607523034234880 (62.5%, estimated))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 3}, !vplan.execution.frequency 5764607523034234880 (62.5%, estimated))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 11529215046068469759 (62.5%, estimated))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 11529215046068469759 (62.5%, estimated))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1, 3}, !vplan.execution.frequency 11529215046068469759 (62.5%, estimated))
 ; VPLAN-NEXT:  Successor(s): inner.then, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  inner.then:
-; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 1441151880758558720 (15.63%, estimated))
+; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 2882303761517117439 (15.63%, estimated))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -1312,28 +1312,28 @@ define void @rarely_executed_chain(ptr noalias %a, ptr noalias %idx) {
 ;
 ; VPLAN-LABEL: VPlan for loop in 'rarely_executed_chain'
 ; VPLAN:       if.a:
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 4294967296 (4.657E-8%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1000, 0}, !vplan.execution.frequency 4294967296 (4.657E-8%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 8589934591 (4.657E-8%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1000, 0}, !vplan.execution.frequency 8589934591 (4.657E-8%))
 ; VPLAN-NEXT:  Successor(s): latch, if.b
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.b:
-; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%i>, ir<20> (!vplan.execution.frequency 2 (2.168E-17%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1, 1}, !vplan.execution.frequency 2 (2.168E-17%))
+; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%i>, ir<20> (!vplan.execution.frequency 3 (1.626E-17%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1, 1}, !vplan.execution.frequency 3 (1.626E-17%))
 ; VPLAN-NEXT:  Successor(s): if.c, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.c:
-; VPLAN-NEXT:    EMIT ir<%c.3> = icmp sgt ir<%i>, ir<30> (!vplan.execution.frequency 1 (1.084E-17%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.3> (!prof {1, 1}, !vplan.execution.frequency 1 (1.084E-17%))
+; VPLAN-NEXT:    EMIT ir<%c.3> = icmp sgt ir<%i>, ir<30> (!vplan.execution.frequency 1 (5.421E-18%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.3> (!prof {1, 1}, !vplan.execution.frequency 1 (5.421E-18%))
 ; VPLAN-NEXT:  Successor(s): latch, if.d
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.d:
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 1 (1.084E-17%))
-; VPLAN-NEXT:    EMIT ir<%c.4> = icmp sgt ir<%i>, ir<40> (!vplan.execution.frequency 1 (1.084E-17%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.4> (!prof {1, 1}, !vplan.execution.frequency 1 (1.084E-17%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 1 (5.421E-18%))
+; VPLAN-NEXT:    EMIT ir<%c.4> = icmp sgt ir<%i>, ir<40> (!vplan.execution.frequency 1 (5.421E-18%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.4> (!prof {1, 1}, !vplan.execution.frequency 1 (5.421E-18%))
 ; VPLAN-NEXT:  Successor(s): if.e, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  if.e:
-; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 1 (1.084E-17%))
+; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 1 (5.421E-18%))
 ; VPLAN-NEXT:  Successor(s): latch
 ;
 entry:
@@ -1398,19 +1398,19 @@ define void @nested_zero_weight_siblings(ptr noalias %a, ptr noalias %idx) {
 ;
 ; VPLAN-LABEL: VPlan for loop in 'nested_zero_weight_siblings'
 ; VPLAN:       then.0:
-; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.a> (!vplan.execution.frequency 9223372032559808512 (100%))
-; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 9223372032559808512 (100%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1000, 0}, !vplan.execution.frequency 9223372032559808512 (100%))
+; VPLAN-NEXT:    EMIT store ir<0>, ir<%gep.a> (!vplan.execution.frequency 18446744065119617023 (100%))
+; VPLAN-NEXT:    EMIT ir<%c.1> = icmp sgt ir<%i>, ir<10> (!vplan.execution.frequency 18446744065119617023 (100%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.1> (!prof {1000, 0}, !vplan.execution.frequency 18446744065119617023 (100%))
 ; VPLAN-NEXT:  Successor(s): then.1, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  then.1:
-; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 9223372028264841218 (100%))
-; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%i>, ir<20> (!vplan.execution.frequency 9223372028264841218 (100%))
-; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1000, 0}, !vplan.execution.frequency 9223372028264841218 (100%))
+; VPLAN-NEXT:    EMIT store ir<1>, ir<%gep.a> (!vplan.execution.frequency 18446744056529682435 (100%))
+; VPLAN-NEXT:    EMIT ir<%c.2> = icmp sgt ir<%i>, ir<20> (!vplan.execution.frequency 18446744056529682435 (100%))
+; VPLAN-NEXT:    EMIT branch-on-cond ir<%c.2> (!prof {1000, 0}, !vplan.execution.frequency 18446744056529682435 (100%))
 ; VPLAN-NEXT:  Successor(s): then.2, latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  then.2:
-; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 9223372023969873925 (100%))
+; VPLAN-NEXT:    EMIT store ir<2>, ir<%gep.a> (!vplan.execution.frequency 18446744047939747850 (100%))
 ; VPLAN-NEXT:  Successor(s): latch
 ; VPLAN-EMPTY:
 ; VPLAN-NEXT:  latch:
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/record-execution-frequencies.ll b/llvm/test/Transforms/LoopVectorize/VPlan/record-execution-frequencies.ll
index c3f3e873d1567..b679e288330da 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/record-execution-frequencies.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/record-execution-frequencies.ll
@@ -28,9 +28,9 @@ define void @if_then(ptr noalias %a, ptr noalias %idx) {
 ; VPLAN0-NEXT:  Successor(s): if.then, latch
 ; VPLAN0-EMPTY:
 ; VPLAN0-NEXT:  if.then:
-; VPLAN0-NEXT:    EMIT ir<%add> = add ir<%i>, ir<10> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN0-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN0-NEXT:    EMIT store ir<%add>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN0-NEXT:    EMIT ir<%add> = add ir<%i>, ir<10> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN0-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4611686018427387903 (25%))
+; VPLAN0-NEXT:    EMIT store ir<%add>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; VPLAN0-NEXT:  Successor(s): latch
 ; VPLAN0-EMPTY:
 ; VPLAN0-NEXT:  latch:
@@ -65,9 +65,9 @@ define void @if_then(ptr noalias %a, ptr noalias %idx) {
 ; MASKED-NEXT:    Successor(s): if.then
 ; MASKED-EMPTY:
 ; MASKED-NEXT:    if.then:
-; MASKED-NEXT:      EMIT ir<%add> = add ir<%i>, ir<10>, ir<%c> (!vplan.execution.frequency 2305843009213693952 (25%))
+; MASKED-NEXT:      EMIT ir<%add> = add ir<%i>, ir<10>, ir<%c> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; MASKED-NEXT:      EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv>
-; MASKED-NEXT:      EMIT store ir<%add>, ir<%gep.a>, ir<%c> (!vplan.execution.frequency 2305843009213693952 (25%))
+; MASKED-NEXT:      EMIT store ir<%add>, ir<%gep.a>, ir<%c> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; MASKED-NEXT:    Successor(s): latch
 ; MASKED-EMPTY:
 ; MASKED-NEXT:    latch:
@@ -128,13 +128,13 @@ define void @if_else(ptr noalias %a, ptr noalias %b, ptr noalias %idx) {
 ; VPLAN0-NEXT:  Successor(s): then, else
 ; VPLAN0-EMPTY:
 ; VPLAN0-NEXT:  else:
-; VPLAN0-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 6917529027641081856 (75%))
-; VPLAN0-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 6917529027641081856 (75%))
+; VPLAN0-NEXT:    EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv> (!vplan.execution.frequency 13835058055282163711 (75%))
+; VPLAN0-NEXT:    EMIT store ir<%i>, ir<%gep.b> (!vplan.execution.frequency 13835058055282163711 (75%))
 ; VPLAN0-NEXT:  Successor(s): latch
 ; VPLAN0-EMPTY:
 ; VPLAN0-NEXT:  then:
-; VPLAN0-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 2305843009213693952 (25%))
-; VPLAN0-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 2305843009213693952 (25%))
+; VPLAN0-NEXT:    EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv> (!vplan.execution.frequency 4611686018427387904 (25%))
+; VPLAN0-NEXT:    EMIT store ir<%i>, ir<%gep.a> (!vplan.execution.frequency 4611686018427387904 (25%))
 ; VPLAN0-NEXT:  Successor(s): latch
 ; VPLAN0-EMPTY:
 ; VPLAN0-NEXT:  latch:
@@ -171,12 +171,12 @@ define void @if_else(ptr noalias %a, ptr noalias %b, ptr noalias %idx) {
 ; MASKED-NEXT:    else:
 ; MASKED-NEXT:      EMIT vp<[[VP4:%[0-9]+]]> = not ir<%c>
 ; MASKED-NEXT:      EMIT ir<%gep.b> = getelementptr inbounds ir<%b>, ir<%iv>
-; MASKED-NEXT:      EMIT store ir<%i>, ir<%gep.b>, vp<[[VP4]]> (!vplan.execution.frequency 6917529027641081856 (75%))
+; MASKED-NEXT:      EMIT store ir<%i>, ir<%gep.b>, vp<[[VP4]]> (!vplan.execution.frequency 13835058055282163711 (75%))
 ; MASKED-NEXT:    Successor(s): then
 ; MASKED-EMPTY:
 ; MASKED-NEXT:    then:
 ; MASKED-NEXT:      EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%iv>
-; MASKED-NEXT:      EMIT store ir<%i>, ir<%gep.a>, ir<%c> (!vplan.execution.frequency 2305843009213693952 (25%))
+; MASKED-NEXT:      EMIT store ir<%i>, ir<%gep.a>, ir<%c> (!vplan.execution.frequency 4611686018427387904 (25%))
 ; MASKED-NEXT:    Successor(s): latch
 ; MASKED-EMPTY:
 ; MASKED-NEXT:    latch:
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll b/llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
index adcf7a4f7ee39..7f44bc7c68294 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
@@ -2850,11 +2850,11 @@ define void @basic_masked(ptr noalias %p.out, ptr %p, i64 %stride, i64 %x) {
 ; CHECK-NEXT:    Successor(s): if
 ; CHECK-EMPTY:
 ; CHECK-NEXT:    if:
-; CHECK-NEXT:      EMIT ir<%idx> = mul ir<%iv>, ir<%stride>, ir<%c> (!vplan.execution.frequency 4611686018427387904 (50%, estimated))
+; CHECK-NEXT:      EMIT ir<%idx> = mul ir<%iv>, ir<%stride>, ir<%c> (!vplan.execution.frequency 9223372036854775807 (50%, estimated))
 ; CHECK-NEXT:      EMIT ir<%gep.ld> = getelementptr ir<%p>, ir<%idx>
-; CHECK-NEXT:      EMIT-SCALAR ir<%ld> = load ir<%gep.ld>, ir<%c> (!vplan.execution.frequency 4611686018427387904 (50%, estimated))
+; CHECK-NEXT:      EMIT-SCALAR ir<%ld> = load ir<%gep.ld>, ir<%c> (!vplan.execution.frequency 9223372036854775807 (50%, estimated))
 ; CHECK-NEXT:      EMIT ir<%gep.st> = getelementptr ir<%p.out>, ir<%iv>
-; CHECK-NEXT:      EMIT store ir<%ld>, ir<%gep.st>, ir<%c> (!vplan.execution.frequency 4611686018427387904 (50%, estimated))
+; CHECK-NEXT:      EMIT store ir<%ld>, ir<%gep.st>, ir<%c> (!vplan.execution.frequency 9223372036854775807 (50%, estimated))
 ; CHECK-NEXT:    Successor(s): latch
 ; CHECK-EMPTY:
 ; CHECK-NEXT:    latch:
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-branch-weights.ll b/llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-branch-weights.ll
index e89172c1286bb..2a5022b2c229b 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-branch-weights.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-branch-weights.ll
@@ -41,11 +41,11 @@ define void @predicated_block(ptr noalias %a, ptr noalias %idx) {
 ; PREDICATE-NEXT:    Successor(s): if.then
 ; PREDICATE-EMPTY:
 ; PREDICATE-NEXT:    if.then:
-; PREDICATE-NEXT:      EMIT ir<%add> = add ir<%i>, ir<1>, ir<%cmp> (!vplan.execution.frequency 2305843009213693952 (25%))
+; PREDICATE-NEXT:      EMIT ir<%add> = add ir<%i>, ir<1>, ir<%cmp> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; PREDICATE-NEXT:      EMIT-SCALAR ir<%t> = trunc ir<%add> to i16
 ; PREDICATE-NEXT:      EMIT-SCALAR ir<%ext> = sext ir<%t> to i64
 ; PREDICATE-NEXT:      EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%ext>
-; PREDICATE-NEXT:      EMIT store ir<%add>, ir<%gep.a>, ir<%cmp> (!vplan.execution.frequency 2305843009213693952 (25%))
+; PREDICATE-NEXT:      EMIT store ir<%add>, ir<%gep.a>, ir<%cmp> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; PREDICATE-NEXT:    Successor(s): latch
 ; PREDICATE-EMPTY:
 ; PREDICATE-NEXT:    latch:
@@ -84,11 +84,11 @@ define void @predicated_block(ptr noalias %a, ptr noalias %idx) {
 ; CONSTRUCT-NEXT:    Successor(s): if.then
 ; CONSTRUCT-EMPTY:
 ; CONSTRUCT-NEXT:    if.then:
-; CONSTRUCT-NEXT:      EMIT ir<%add> = add ir<%i>, ir<1>, ir<%cmp> (!vplan.execution.frequency 2305843009213693952 (25%))
+; CONSTRUCT-NEXT:      EMIT ir<%add> = add ir<%i>, ir<1>, ir<%cmp> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; CONSTRUCT-NEXT:      EMIT-SCALAR ir<%t> = trunc ir<%add> to i16
 ; CONSTRUCT-NEXT:      EMIT-SCALAR ir<%ext> = sext ir<%t> to i64
 ; CONSTRUCT-NEXT:      EMIT ir<%gep.a> = getelementptr inbounds ir<%a>, ir<%ext>
-; CONSTRUCT-NEXT:      REPLICATE store ir<%add>, ir<%gep.a>, ir<%cmp> (!vplan.execution.frequency 2305843009213693952 (25%))
+; CONSTRUCT-NEXT:      REPLICATE store ir<%add>, ir<%gep.a>, ir<%cmp> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; CONSTRUCT-NEXT:    Successor(s): latch
 ; CONSTRUCT-EMPTY:
 ; CONSTRUCT-NEXT:    latch:
@@ -131,7 +131,7 @@ define void @predicated_block(ptr noalias %a, ptr noalias %idx) {
 ; REGION-EMPTY:
 ; REGION-NEXT:    <xVFxUF> pred.store: {
 ; REGION-NEXT:      pred.store.entry:
-; REGION-NEXT:        BRANCH-ON-MASK ir<%cmp> (!vplan.execution.frequency 2305843009213693952 (25%))
+; REGION-NEXT:        BRANCH-ON-MASK ir<%cmp> (!vplan.execution.frequency 4611686018427387903 (25%))
 ; REGION-NEXT:      Successor(s): pred.store.if, pred.store.continue
 ; REGION-EMPTY:
 ; REGION-NEXT:      pred.store.if:



More information about the llvm-commits mailing list