[PATCH] D127354: Allow bitwidth difference when checking for isOneOrOneSplat.
Adrian Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 11:26:36 PDT 2022
adriantong1024 added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10634
bool llvm::isOneOrOneSplat(SDValue N, bool AllowUndefs) {
// TODO: may want to use peekThroughBitcast() here.
+ ConstantSDNode *C = isConstOrConstSplat(N, AllowUndefs, /*AllowTruncation*/ true);
----------------
adriantong1024 wrote:
> craig.topper wrote:
> > Are all of the callers of isOneOrOneSplat ok with this change?
> >
> > Is this change correct for the caller you’re interested in if the element type of the build_vector is i1?
> Let me go through the callers one by one. There are 8 uses of isOneOrOneSplat in llvm, all in DAGCombiner.cpp.
>
> so far, I ran through check-llvm and looks good.
The bitwidth check was added https://reviews.llvm.org/D25374 and I have ran check-llvm-codegen for all available targets and things are fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127354/new/
https://reviews.llvm.org/D127354
More information about the llvm-commits
mailing list