[llvm] [SelectionDAG] Verify SPLAT_VECTOR nodes when they are created. (PR #88305)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 04:11:46 PDT 2024
================
@@ -6020,6 +6020,17 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
if (N1.getValueType().getScalarType() == MVT::i1)
return getNode(ISD::VECREDUCE_AND, DL, VT, N1);
break;
+ case ISD::SPLAT_VECTOR:
+ assert(VT.isVector() && "Wrong return type!");
+ // FIXME: Hexagon uses i32 scalar for a floating point zero vector so allow
+ // that for now.
+ assert((VT.getVectorElementType() == N1.getValueType() ||
+ (!VT.isInteger() && N1.getValueType() == MVT::i32) ||
----------------
paulwalker-arm wrote:
Can this use `isFloatingPoint()` rather than `!VT.isInteger()`?
https://github.com/llvm/llvm-project/pull/88305
More information about the llvm-commits
mailing list