@@ -12400,15 +12400,6 @@ void Optimizer::newDoNoMaskWA()
1240012400 return PRED_DEFAULT;
1240112401 };
1240212402
12403- // Return condMod if a flag register is used. Since sel
12404- // does not update flag register, return null for sel.
12405- auto getFlagModifier = [](G4_INST* I) -> G4_CondMod* {
12406- if (I->opcode() == G4_sel || I->opcode() == G4_csel) {
12407- return nullptr;
12408- }
12409- return I->getCondMod();
12410- };
12411-
1241212403 // Return true if a NoMask inst is either send or global
1241312404 auto isCandidateInst = [&](G4_INST* Inst, FlowGraph& cfg) -> bool {
1241412405 // pseudo should be gone at this time [skip all pseudo].
@@ -12773,9 +12764,9 @@ void Optimizer::newDoNoMaskWA()
1277312764 G4_CondMod* P = I->getCondMod();
1277412765 assert((P && !I->getPredicate()) && "ICE: expect flagModifier and no predicate!");
1277512766
12776- if (I->opcode() == G4_sel)
12767+ if (I->opcode() == G4_sel || I->opcode() == G4_csel )
1277712768 {
12778- // Special handling of sel inst
12769+ // Special handling of sel/csel inst
1277912770 doFlagModifierSelInstWA(aFlagVarDefInst, aFlagVar, aBB, aII);
1278012771 return;
1278112772 }
@@ -13252,7 +13243,7 @@ void Optimizer::doNoMaskWA()
1325213243 // Return condMod if a flag register is used. Since sel
1325313244 // does not update flag register, return null for sel.
1325413245 auto getFlagModifier = [](G4_INST* I) -> G4_CondMod* {
13255- if (I->opcode() == G4_sel) {
13246+ if (I->opcode() == G4_sel || I->opcode() == G4_csel ) {
1325613247 return nullptr;
1325713248 }
1325813249 return I->getCondMod();
0 commit comments