[clang] [RISCV][GISel] Select G_SELECT (PR #67614)

Michael Maitland via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 16:00:45 PDT 2023


================
@@ -239,6 +245,11 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
   }
   case TargetOpcode::G_SEXT_INREG:
     return selectSExtInreg(MI, MIB);
+  case TargetOpcode::G_SELECT:
+    if (!selectSelect(MI, MIB, MRI))
+      return false;
+    MI.eraseFromParent();
----------------
michaelmaitland wrote:

Looks like other `select` functions (i.e. selectSExtInreg) do `MI.eraseFromParent();` in `selectXX`. Should we move this one into `selectSelect` in the `true` cases for consistency and simplification here?

https://github.com/llvm/llvm-project/pull/67614


More information about the cfe-commits mailing list