[PATCH] D85966: [GlobalISel] Add a combine for sext_inreg(load x), c --> sextload x

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 09:43:18 PDT 2020


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:665
+
+  // Avoid widening the load at all.
+  auto &MMO = **LoadDef->memoperands_begin();
----------------
paquette wrote:
> Comment is weird here?
Yeah this got separated from it's LOC.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:668
+
+  Builder.setInstrAndDebugLoc(MI);
+  auto *MF = MI.getParent()->getParent();
----------------
paquette wrote:
> I don't think we do this everywhere in the combiner. Should we be doing this everywhere? (We should probably be doing this everywhere.)
Yep, I think so.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85966



More information about the llvm-commits mailing list