[PATCH] D148341: [DAGCombiner] Fold add (mul x, C), x to mul x, C+1
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 09:16:37 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3061
+ // add (mul x, C), x -> mul x, C+1
+ if (N0.getOpcode() == ISD::MUL && N0.getOperand(0) == N1 &&
----------------
Does the equivilent ever come up for sub?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148341/new/
https://reviews.llvm.org/D148341
More information about the llvm-commits
mailing list