We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f41fddc commit 4edde52Copy full SHA for 4edde52
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -2052,9 +2052,7 @@ uint64_t PreRARematStage::ScoredRemat::getFreqDiff(const FreqInfo &Freq) const {
2052
// to values that will yield the worst possible score given known frequencies
2053
// in order to penalize rematerializations from or into regions whose
2054
// frequency is unknown.
2055
- uint64_t DefOrOne = Freq.Regions[Remat->DefRegion];
2056
- if (!DefOrOne)
2057
- DefOrOne = 1;
+ uint64_t DefOrOne = std::max(Freq.Regions[Remat->DefRegion], (uint64_t)1);
2058
uint64_t UseOrMax = Freq.Regions[Remat->UseRegion];
2059
if (!UseOrMax)
2060
UseOrMax = Freq.MaxFreq;
0 commit comments