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 be6bf74 commit 6dd8bf2Copy full SHA for 6dd8bf2
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -2229,9 +2229,7 @@ uint64_t PreRARematStage::ScoredRemat::getFreqDiff(const FreqInfo &Freq) const {
2229
// to values that will yield the worst possible score given known frequencies
2230
// in order to penalize rematerializations from or into regions whose
2231
// frequency is unknown.
2232
- uint64_t DefOrOne = Freq.Regions[Remat->DefRegion];
2233
- if (!DefOrOne)
2234
- DefOrOne = 1;
+ uint64_t DefOrOne = std::max(Freq.Regions[Remat->DefRegion], (uint64_t)1);
2235
uint64_t UseOrMax = Freq.Regions[Remat->UseRegion];
2236
if (!UseOrMax)
2237
UseOrMax = Freq.MaxFreq;
0 commit comments