Repository: llvm/llvm-project
File: llvm/lib/Target/X86/X86ExpandPseudo.cpp (C++)

Code before:
    MBBI->eraseFromParent();
    return true;
  }
  case TargetOpcode::ICALL_BRANCH_FUNNEL:
    expandICallBranchFunnel(&MBB, MBBI);
    return true;
  case X86::PLDTILECFGV: {
    MI.setDesc(TII->get(GET_EGPR_IF_ENABLED(X86::LDTILECFG)));
    return true;
  }
  case X86::PTILELOADDV:
  case X86::PTILELOADDT1V:
  case X86::PTILELOADDRSV:
  case X86::PTILELOADDRST1V:
  case X86::PTCVTROWD2PSrreV:
  case X86::PTCVTROWD2PSrriV:
  case X86::PTCVTROWPS2BF16HrreV:
  case X86::PTCVTROWPS2BF16HrriV:
  case X86::PTCVTROWPS2BF16LrreV:
  case X86::PTCVTROWPS2BF16LrriV:
  case X86::PTCVTROWPS2PHHrreV:
  case X86::PTCVTROWPS2PHHrriV:
  case X86::PTCVTROWPS2PHLrreV:
  case X86::PTCVTROWPS2PHLrriV:
  case X86::PTILEMOVROWrteV:
  case X86::PTILEMOVROWrtiV: {
    for (unsigned i = 2; i > 0; --i)
      MI.removeOperand(i);
    unsigned Opc;
    switch (Opcode) {
    case X86::PTILELOADDRSV:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDRS);
      break;
    case X86::PTILELOADDRST1V:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDRST1);
      break;
    case X86::PTILELOADDV:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADD);
      break;
    case X86::PTILELOADDT1V:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDT1);
      break;
    case X86::PTCVTROWD2PSrreV:
      Opc = X86::TCVTROWD2PSrte;
      break;
    case X86::PTCVTROWD2PSrriV:
      Opc = X86::TCVTROWD2PSrti;
      break;
    case X86::PTCVTROWPS2BF16HrreV:
      Opc = X86::TCVTROWPS2BF16Hrte;
      break;

Review comment (suggestion):
There are other pseudos like `PTCVTROWD2PSrriV` that transform into `TCVTROWD2PSrti` I suppose they also should be changed.

Code after:
    MBBI->eraseFromParent();
    return true;
  }
  case TargetOpcode::ICALL_BRANCH_FUNNEL:
    expandICallBranchFunnel(&MBB, MBBI);
    return true;
  case X86::PLDTILECFGV: {
    MI.setDesc(TII->get(GET_EGPR_IF_ENABLED(X86::LDTILECFG)));
    return true;
  }
  case X86::PTILELOADDV:
  case X86::PTILELOADDT1V:
  case X86::PTILELOADDRSV:
  case X86::PTILELOADDRST1V:
  case X86::PTCVTROWD2PSrteV:
  case X86::PTCVTROWD2PSrtiV:
  case X86::PTCVTROWPS2BF16HrteV:
  case X86::PTCVTROWPS2BF16HrtiV:
  case X86::PTCVTROWPS2BF16LrteV:
  case X86::PTCVTROWPS2BF16LrtiV:
  case X86::PTCVTROWPS2PHHrteV:
  case X86::PTCVTROWPS2PHHrtiV:
  case X86::PTCVTROWPS2PHLrteV:
  case X86::PTCVTROWPS2PHLrtiV:
  case X86::PTILEMOVROWrteV:
  case X86::PTILEMOVROWrtiV: {
    for (unsigned i = 2; i > 0; --i)
      MI.removeOperand(i);
    unsigned Opc;
    switch (Opcode) {
    case X86::PTILELOADDRSV:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDRS);
      break;
    case X86::PTILELOADDRST1V:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDRST1);
      break;
    case X86::PTILELOADDV:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADD);
      break;
    case X86::PTILELOADDT1V:
      Opc = GET_EGPR_IF_ENABLED(X86::TILELOADDT1);
      break;
    case X86::PTCVTROWD2PSrteV:
      Opc = X86::TCVTROWD2PSrte;
      break;
    case X86::PTCVTROWD2PSrtiV:
      Opc = X86::TCVTROWD2PSrti;
      break;
    case X86::PTCVTROWPS2BF16HrteV:
      Opc = X86::TCVTROWPS2BF16Hrte;
      break;