[PATCH] D87117: [GlobalISel] Add G_UNMERGE_VALUES(G_MERGE_VALUES) combine

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 16:29:34 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:392
+>;
+
 // FIXME: These should use the custom predicate feature once it lands.
----------------
Missing from all combines


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1561
+                                   const MachineRegisterInfo &MRI) {
+  while (mi_match(Reg, MRI, m_GBitcast(m_Reg(Reg))))
+    ;
----------------
Since this uses buildCast, this can accept a wider array of cast types (particularly G_PTRTOINT and G_INTTOPTR?)


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1605
+  bool CanReuseInputDirectly = DstTy == SrcTy;
+  Builder.setInstr(MI);
+  for (unsigned Idx = 0; Idx < NumElems; ++Idx) {
----------------
setInstrAndDebugLoc? (We should probably just make setInstr always set the debug location)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87117



More information about the llvm-commits mailing list