File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1586,26 +1586,28 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) {
15861586LogicalResult cir::VecShuffleOp::verify () {
15871587 // The number of elements in the indices array must match the number of
15881588 // elements in the result type.
1589- if (getIndices ().size () != getResult ().getType ().getSize ())
1589+ if (getIndices ().size () != getResult ().getType ().getSize ()) {
15901590 return emitOpError () << " : the number of elements in " << getIndices ()
15911591 << " and " << getResult ().getType () << " don't match" ;
1592+ }
15921593
15931594 // The element types of the two input vectors and of the result type must
15941595 // match.
15951596 if (getVec1 ().getType ().getElementType () !=
1596- getResult ().getType ().getElementType ())
1597+ getResult ().getType ().getElementType ()) {
15971598 return emitOpError () << " : element types of " << getVec1 ().getType ()
15981599 << " and " << getResult ().getType () << " don't match" ;
1600+ }
15991601
16001602 const uint64_t maxValidIndex =
16011603 getVec1 ().getType ().getSize () + getVec2 ().getType ().getSize () - 1 ;
16021604 if (llvm::any_of (
16031605 getIndices ().getAsRange <cir::IntAttr>(), [&](cir::IntAttr idxAttr) {
16041606 return idxAttr.getSInt () != -1 && idxAttr.getUInt () > maxValidIndex;
1605- }))
1607+ })) {
16061608 return emitOpError () << " : index for __builtin_shufflevector must be "
16071609 " less than the total number of vector elements" ;
1608-
1610+ }
16091611 return success ();
16101612}
16111613
You can’t perform that action at this time.
0 commit comments