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 b805a71 commit b0f4cd6Copy full SHA for b0f4cd6
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -2252,9 +2252,7 @@ uint64_t PreRARematStage::ScoredRemat::getFreqDiff(const FreqInfo &Freq) const {
2252
// to values that will yield the worst possible score given known frequencies
2253
// in order to penalize rematerializations from or into regions whose
2254
// frequency is unknown.
2255
- uint64_t DefOrOne = Freq.Regions[Remat->DefRegion];
2256
- if (!DefOrOne)
2257
- DefOrOne = 1;
+ uint64_t DefOrOne = std::max(Freq.Regions[Remat->DefRegion], (uint64_t)1);
2258
uint64_t UseOrMax = Freq.Regions[Remat->UseRegion];
2259
if (!UseOrMax)
2260
UseOrMax = Freq.MaxFreq;
0 commit comments