[PATCH] D118264: [DAG] SelectionDAG::getNode(N1,N2) - detect N2 constant vector splats as well as scalars
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 00:45:43 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5633
if (TLI->isCommutativeBinOp(Opcode)) {
bool IsN1C = isConstantIntBuildVectorOrConstantInt(N1);
bool IsN2C = isConstantIntBuildVectorOrConstantInt(N2);
----------------
david-arm wrote:
> I wonder if this is also not canonicalising constant vector splats to the RHS as well? Not saying you should fix this in your patch though - its just an observation!
Despite it's name it does handle ISD::SPLAT_VECTOR. Is that what you meant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118264/new/
https://reviews.llvm.org/D118264
More information about the llvm-commits
mailing list