We can't delete MASK_WRITE instructions from the program, because this
will cause instructions being masked by MASK_WRITE to be marked dead and
then deleted in the dce pass.
case AMDIL::RETURN:
case AMDIL::LOAD_INPUT:
case AMDIL::LAST:
+ case AMDIL::MASK_WRITE:
case AMDIL::RESERVE_REG:
return true;
}
MachineInstr * defInstr = MRI->getVRegDef(maskedRegister);
MachineOperand * def = defInstr->findRegisterDefOperand(maskedRegister);
def->addTargetFlag(MO_FLAG_MASK);
- break;
+ /* Continue so the instruction is not erased */
+ continue;
}
case AMDIL::NEGATE_i32: