[PATCH] D126005: [GISel] Add identity and fneg combines for G_FMUL

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 07:39:47 PST 2023


arsenm added inline comments.
Herald added a subscriber: StephenFan.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2434-2435
+bool CombinerHelper::matchFConstantOp(const MachineOperand &MOP, double C) {
+  if (!MOP.isReg())
+    return false;
+  const ConstantFP *FCst = getConstantFPVRegVal(MOP.getReg(), MRI);
----------------
This is illegal, no reason to check for it. Really we should just consistently use Register in the API


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126005



More information about the llvm-commits mailing list