This teaches the DemandedElts version of isConstOrConstSplat about SPLAT_VECTORS, in the same way as the non-DemandedElts version by calling the demanded-bits version from the non-demanded-bits version.
Details
Diff Detail
Event Timeline
Update to just call the demanded-bits version of the function from the demanded-bits version, and do the same for isConstOrConstSplatFP.
I've no objections, but the experts on SVE targets need to have final say.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
10672 | Please can you add a TODO - about whether we should allow UndefElements in non-DemandedElts? | |
10712 | Please can you add a TODO - about whether we should allow UndefElements in non-DemandedElts? |
Thanks for the review. I think there is enough in now that this can go ahead. Hopefully it won't hit the same issues seen on Hexagon in the other patches. Let me know if anything does look off.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
10616 | Yes. Those are already in the version I am about to commit. I was just running ninja check-all first and it was taking a long time for some reason. |
Based on @reames's demanded elts patches I think this should be isFixedLengthVector()? because we now use a 1bit APInt to represent demanding all elements of a scalable vector.