[PATCH] D107711: [DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 01:51:55 PDT 2021


luismarques added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9088
+  // Let the DAGCombiner decide for larger types.
+  if (Subtarget.getXLen() < VT.getScalarSizeInBits())
+    return true;
----------------
Nit: IMO, it would be more intuitive to compare the other way around, swapping the operands and changing the condition to `>=`.


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

https://reviews.llvm.org/D107711



More information about the llvm-commits mailing list