[llvm] [SelectionDAG] Simplify vselect true, T, F -> T (PR #100992)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 07:39:06 PDT 2024
================
@@ -13138,6 +13117,23 @@ SDNode *SelectionDAG::isConstantFPBuildVectorOrConstantFP(SDValue N) const {
return nullptr;
}
+std::optional<bool> SelectionDAG::isBoolConstant(SDValue N,
+ bool AllowTruncation) const {
+ ConstantSDNode *Const = isConstOrConstSplat(N, false, AllowTruncation);
+ if (!Const)
+ return std::nullopt;
+
+ switch (TLI->getBooleanContents(N.getValueType())) {
----------------
lukel97 wrote:
Ah I see what you meant by the original signature you suggested, that makes sense
https://github.com/llvm/llvm-project/pull/100992
More information about the llvm-commits
mailing list