[llvm] [AArch64][SVE] Add AArch64ISD nodes for wide add instructions (PR #115895)

James Chesterman via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 01:02:12 PST 2024


================
@@ -29702,6 +29711,26 @@ void AArch64TargetLowering::verifyTargetSDNode(const SDNode *N) const {
   switch (N->getOpcode()) {
   default:
     break;
+  case AArch64ISD::SADDWT:
+  case AArch64ISD::SADDWB:
+  case AArch64ISD::UADDWT:
+  case AArch64ISD::UADDWB: {
+    assert(N->getNumValues() == 1 && "Expected one result!");
+    assert(N->getNumOperands() == 2 && "Expected two operands!");
+    EVT VT = N->getValueType(0);
+    EVT Op0VT = N->getOperand(0).getValueType();
+    EVT Op1VT = N->getOperand(1).getValueType();
+    assert(VT.isVector() && Op0VT.isVector() && Op1VT.isVector() &&
+           "Expected vectors!");
+    assert(VT.getSizeInBits() == Op0VT.getSizeInBits() &&
+           Op0VT.getSizeInBits() == Op1VT.getSizeInBits() &&
+           "Expected vectors of equal size!");
+    assert(Op0VT.getVectorElementCount() * 2 == Op1VT.getVectorElementCount() &&
+           Op0VT.getVectorElementCount() == VT.getVectorElementCount() &&
+           "Expected result vector and first input vector to have half the "
+           "lanes of the second input vector!");
----------------
JamesChesterman wrote:

Done

https://github.com/llvm/llvm-project/pull/115895


More information about the llvm-commits mailing list