[PATCH] D95326: [GlobalISel] Implement widenScalar for carry-in add/sub

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 11:08:16 PST 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1768
+  unsigned ExtOpcode;
+  Optional<MachineOperand> CarryIn = None;
+  switch (MI.getOpcode()) {
----------------
Should just use a plain Register here, MachineOperand values are generally bad


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1817-1818
+                            {LHSExt, RHSExt, *CarryIn})
+                ->getOperand(0)
+                .getReg();
+  } else {
----------------
This is .getReg(0)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95326



More information about the llvm-commits mailing list