[PATCH] D108129: [DAGCombiner] Teach combineShiftToMULH to handle constant and const splat vector.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 05:25:02 PDT 2021
jacquesguan added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8583
- SDValue Result = DAG.getNode(MulhOpcode, DL, NarrowVT, LeftOp.getOperand(0),
- RightOp.getOperand(0));
+ SDValue Result =
+ HasConstant
----------------
frasercrmck wrote:
> I might be narrowly-focussed here, but I'm not sure why we need a ternary here. Can't we capture `RightOp.getOperand(0)` in a variable and ensure it's correct in the the `if (HasConstant)` block? Would that simplify any of the other logic?
Done, thank you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108129/new/
https://reviews.llvm.org/D108129
More information about the llvm-commits
mailing list