[llvm] [DAG] Handle truncated splat in isBoolConstant (PR #145473)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 02:57:32 PDT 2025
================
@@ -4375,6 +4375,8 @@ class LLVM_ABI TargetLowering : public TargetLoweringBase {
Op.getOpcode() == ISD::SPLAT_VECTOR_PARTS;
}
+ virtual bool isTargetCanonicalSelect(SDNode *N) const { return false; }
----------------
davemgreen wrote:
As I said in #145724 I don't think this is a "hack" (not that I try to use that word, it tends to be a bit overused and nebulous in meaning). It would seem better to me to let the target control the canonicalization than to enforce a new layer of combining between dag-combining and selection (that only the target controls, but needs to implement a lot of complexity in to make optimal). If there is a canonicalization in DAG combine that it does not want, or wants the opposite of, we shouldn't have the policy of not allowing the targets to disable them.
Having said that, thanks for the fixes!
https://github.com/llvm/llvm-project/pull/145473
More information about the llvm-commits
mailing list