From 72ce58e23e2e7cc185f2f968a0b6978be4d4a5c3 Mon Sep 17 00:00:00 2001 From: Rob Suderman Date: Tue, 30 Apr 2019 09:52:38 -0700 Subject: [PATCH] ExtractElementsOp asserts for >1 operator however it actually expects >0 operators. -- PiperOrigin-RevId: 245966586 --- mlir/lib/StandardOps/Ops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/StandardOps/Ops.cpp b/mlir/lib/StandardOps/Ops.cpp index ab600bde..3aa35cd 100644 --- a/mlir/lib/StandardOps/Ops.cpp +++ b/mlir/lib/StandardOps/Ops.cpp @@ -1546,7 +1546,7 @@ LogicalResult ExtractElementOp::verify() { Attribute ExtractElementOp::constantFold(ArrayRef operands, MLIRContext *context) { - assert(operands.size() > 1 && "extract_element takes atleast one operands"); + assert(!operands.empty() && "extract_element takes atleast one operand"); // The aggregate operand must be a known constant. Attribute aggregate = operands.front(); -- 2.7.4