[PATCH] D103246: [SelectionDAG] Extend FoldConstantVectorArithmetic to SPLAT_VECTOR
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 31 04:44:23 PDT 2021
frasercrmck added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5301
+ return Op.isUndef() || Op.getOpcode() == ISD::CONDCODE ||
+ Op.getOpcode() == ISD::SPLAT_VECTOR || (BV && BV->isConstant());
};
----------------
frasercrmck wrote:
> craig.topper wrote:
> > Why don't we need to check that the splat vector operand is constant/undef like we do for build_vector?
> Oh, good catch! I'm surprised nothing failed. I'll see to that.
I've updated to use `ISD::isConstantSplatVector` which isn't ideal but I didn't want to add yet-another method for checking these nodes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103246/new/
https://reviews.llvm.org/D103246
More information about the llvm-commits
mailing list