[PATCH] D86516: GlobalISel: Add combines for extend operations

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 12:44:32 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1759-1760
+  Register DstReg = MI.getOperand(0).getReg();
+  Builder.setInstr(MI);
+  Builder.buildCopy(DstReg, Reg);
+  MI.eraseFromParent();
----------------
setInstrAndDebugLoc?

Why build a copy instead of  CombinerHelper::replaceRegWith?


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1811
+    Register DstReg = MI.getOperand(0).getReg();
+    Builder.setInstr(MI);
+    Builder.buildInstr(SrcExtOp, {DstReg}, {Reg});
----------------
setInstrAndDebugLoc?


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

https://reviews.llvm.org/D86516



More information about the llvm-commits mailing list