Skip to content

Commit 8a939cf

Browse files
vsemenov368igcbot
authored andcommitted
Fix coverity issue in VC
.
1 parent 299ebdb commit 8a939cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXSimdCFConformance.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,8 +2088,8 @@ void GenXSimdCFConformance::lowerUnsuitableGetEMs() {
20882088
}
20892089

20902090
// Constants and non-EM values should be used directly
2091-
if (dyn_cast<Constant>(GetEMPred) ||
2092-
!getEMProducer(dyn_cast<Instruction>(GetEMPred), Visited)) {
2091+
if (auto *Inst = dyn_cast<Instruction>(GetEMPred);
2092+
isa<Constant>(GetEMPred) || Inst && !getEMProducer(Inst, Visited)) {
20932093
GetEM->replaceAllUsesWith(GetEM->getOperand(0));
20942094
ToDelete.push_back(GetEM);
20952095
}

0 commit comments

Comments
 (0)