[PATCH] D107711: [DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 19 06:54:05 PDT 2021
benshi001 marked 2 inline comments as done.
benshi001 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;
----------------
luismarques wrote:
> jrtc27 wrote:
> > benshi001 wrote:
> > > luismarques wrote:
> > > > Nit: IMO, it would be more intuitive to compare the other way around, swapping the operands and changing the condition to `>=`.
> > > I can swap the operands, but why changing the condition to `>=`, should using `>` be better? Since I think this should consider i64 on rv64 and i32 on rv32.
> > Yes, `>` is correct, and I agree with Luis that this is the more natural way round to express it.
> Sorry, ignore the part about the equals :) I mixed some thoughts when writing that.
Thanks. The order has been changed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107711/new/
https://reviews.llvm.org/D107711
More information about the llvm-commits
mailing list