Skip to content

Commit 35baff8

Browse files
authored
[AMDGPU] Correct assert that incorrectly chained multiple == operators. (#70291)
I believe this assert was trying to check that 3 variables were equal to 0. I think it instead got interpreted as ((DSWCount == DSWWithPermCount) == DSWWithSharedVMEMCount) == 0 I guess (DSWCount == DSWWithPermCount) was true because both counts were 0. Then true got compared to DSWWithSharedVMEMCount, and since DSWWithSharedVMEMCount is 0, that compare was false. And then that false compared equal to the final 0.
1 parent 3c58e53 commit 35baff8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ void MFMASmallGemmSingleWaveOpt::applyIGLPStrategy(
11211121
unsigned MFMACount = 0;
11221122
unsigned DSRCount = 0;
11231123

1124-
assert((IsPostRA ||
1125-
DSWCount == DSWWithPermCount == DSWWithSharedVMEMCount == 0) &&
1124+
assert((IsPostRA || (DSWCount == 0 && DSWWithPermCount == 0 &&
1125+
DSWWithSharedVMEMCount == 0)) &&
11261126
"DSWCounters should be zero in pre-RA scheduling!");
11271127
SmallVector<SUnit *, 6> DSWithPerms;
11281128
for (auto &SU : DAG->SUnits) {

0 commit comments

Comments
 (0)