[llvm] 1216e70 - [DAG] getNode - add value type assertions for AVG nodes.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 09:00:46 PDT 2024
Author: Simon Pilgrim
Date: 2024-06-12T17:00:33+01:00
New Revision: 1216e7045f78b8b2eae02ba5c729696177cdce3e
URL: https://github.com/llvm/llvm-project/commit/1216e7045f78b8b2eae02ba5c729696177cdce3e
DIFF: https://github.com/llvm/llvm-project/commit/1216e7045f78b8b2eae02ba5c729696177cdce3e.diff
LOG: [DAG] getNode - add value type assertions for AVG nodes.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 5b16c2effa39d..8463e94d7f933 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -6952,6 +6952,14 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
return getNode(ISD::AND, DL, VT, N1, getNOT(DL, N2, VT));
}
break;
+ case ISD::AVGFLOORS:
+ case ISD::AVGFLOORU:
+ case ISD::AVGCEILS:
+ case ISD::AVGCEILU:
+ assert(VT.isInteger() && "This operator does not apply to FP types!");
+ assert(N1.getValueType() == N2.getValueType() &&
+ N1.getValueType() == VT && "Binary operator types must match!");
+ break;
case ISD::ABDS:
case ISD::ABDU:
assert(VT.isInteger() && "This operator does not apply to FP types!");
More information about the llvm-commits
mailing list