[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 2 11:36:02 PDT 2025
================
@@ -1589,6 +1589,24 @@ LogicalResult cir::VecShuffleDynamicOp::verify() {
return success();
}
+//===----------------------------------------------------------------------===//
+// VecTernaryOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::VecTernaryOp::verify() {
+ // Verify that the condition operand has the same number of elements as the
+ // other operands. (The automatic verification already checked that all
+ // operands are vector types and that the second and third operands are the
+ // same type.)
+ if (mlir::cast<cir::VectorType>(getCond().getType()).getSize() !=
----------------
xlauko wrote:
No need for cast once https://github.com/llvm/llvm-project/pull/142222/ is merged
https://github.com/llvm/llvm-project/pull/142393
More information about the cfe-commits
mailing list