[PATCH] D100725: GlobalISel: Help reduce operation width for instruction with two results.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 16:17:09 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4050
+    else
+      Inst = MIRBuilder.buildInstr(Opc, {NarrowDstTy, NarrowDstTy}, InputRegs,
+                                   Flags);
----------------
This is assuming the two results have the same type, which I guess is fine for now


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4063
+      ResultRegs[I].append(NumUndefParts,
+                           MIRBuilder.buildUndef(NarrowDstTy).getReg(0));
+  }
----------------
You don't need to call build undef for each time. I think just append(Num, Reg) works?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100725/new/

https://reviews.llvm.org/D100725



More information about the llvm-commits mailing list