[llvm] [DAG] NFC: Reword SCALAR_TO_VECTOR poison comment in SimplifyDemandedBits (PR #226003)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 01:54:00 PDT 2026
bjope wrote:
So this is a general rule for SimplifyDemandedVectorElts and SimplifyDemandedVectorEltsForTargetNode, that KnownUndef should exclude poison. Then I guess that should be documented in TargetLowering.h instead of being described specifically for SCALAR_TO_VECTOR.
But it also makes me confused since TargetLowering::SimplifyDemandedVectorElts has this:
```
// Undef operand.
if (Op.isUndef()) {
KnownUndef.setAllBits();
return false;
}
```
which does include poison in KnownUndef propagation.
Does it really make sense that there is a special rule for SCALAR_TO_VECTOR? What am I missing here?
https://github.com/llvm/llvm-project/pull/226003
More information about the llvm-commits
mailing list