[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 08:53:49 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);
----------------
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.
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