lib/HLSL/HLMatrixLowerPass.cpp
// Replace matInst with vecInst on matUseInst.
Replace matInst with vecInst on matUseInst.
Replace matInst with vecInst on matUseInst .
void HLMatrixLowerPass::TrivialMatUnOpReplace(CallInst *matInst,
                                             Instruction *vecInst,
                                             CallInst *matUseInst) {
  HLUnaryOpcode opcode = static_cast<HLUnaryOpcode>(GetHLOpcode(matUseInst));
  Instruction *vecUseInst = cast<Instruction>(matToVecMap[matUseInst]);
  switch (opcode) {
  case HLUnaryOpcode::Not:
    vecUseInst->setOperand(0, vecInst);
    vecUseInst->setOperand(1, vecInst);
    break;
  case HLUnaryOpcode::LNot:
  case HLUnaryOpcode::PostInc:
  case HLUnaryOpcode::PreInc:
  case HLUnaryOpcode::PostDec:
  case HLUnaryOpcode::PreDec:
    vecUseInst->setOperand(0, vecInst);
    break;
  }
}
void HLMatrixLowerPass :: TrivialMatUnOpReplace ( CallInst * matInst , Instruction * vecInst , CallInst * matUseInst ) { HLUnaryOpcode opcode = static_cast < HLUnaryOpcode > ( GetHLOpcode ( matUseInst ) ) ; Instruction * vecUseInst = cast < Instruction > ( matToVecMap [ matUseInst ] ) ; switch ( opcode ) { case HLUnaryOpcode :: Not : vecUseInst -> setOperand ( 0 , vecInst ) ; vecUseInst -> setOperand ( 1 , vecInst ) ; break ; case HLUnaryOpcode :: LNot : case HLUnaryOpcode :: PostInc : case HLUnaryOpcode :: PreInc : case HLUnaryOpcode :: PostDec : case HLUnaryOpcode :: PreDec : vecUseInst -> setOperand ( 0 , vecInst ) ; break ; } }
Replace matInst with vecInst on matUseInst.
Replace matInst with vecInst on matUseInst .
// Not is xor now