瀏覽代碼

r600g/llvm: Fix handling of MASK_WRITE instructions

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.
tags/i965-primitive-restart-v2
Tom Stellard 13 年之前
父節點
當前提交
4da1fcacf1
共有 2 個檔案被更改,包括 3 行新增1 行删除
  1. 1
    0
      src/gallium/drivers/radeon/AMDGPUUtil.cpp
  2. 2
    1
      src/gallium/drivers/radeon/R600LowerInstructions.cpp

+ 1
- 0
src/gallium/drivers/radeon/AMDGPUUtil.cpp 查看文件

@@ -34,6 +34,7 @@ bool llvm::isPlaceHolderOpcode(unsigned opcode)
case AMDIL::RETURN:
case AMDIL::LOAD_INPUT:
case AMDIL::LAST:
case AMDIL::MASK_WRITE:
case AMDIL::RESERVE_REG:
return true;
}

+ 2
- 1
src/gallium/drivers/radeon/R600LowerInstructions.cpp 查看文件

@@ -311,7 +311,8 @@ bool R600LowerInstructionsPass::runOnMachineFunction(MachineFunction &MF)
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:

Loading…
取消
儲存