[llvm] [RISCV][GlobalISel] Select G_PTR_ADD (PR #67605)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 16:39:04 PDT 2023


================
@@ -225,9 +237,13 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
 
   switch (Opc) {
   case TargetOpcode::G_ANYEXT:
-  case TargetOpcode::G_TRUNC:
+  case TargetOpcode::G_PTRTOINT:
+  case TargetOpcode::G_TRUNC: {
     MI.setDesc(TII.get(TargetOpcode::COPY));
+    bool Selected = selectCopy(MI, MRI);
+    assert(Selected && "Could not select copy!");
----------------
topperc wrote:

This piece of code has been rewritten recently. Please rebase.

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


More information about the llvm-commits mailing list