================
@@ -1427,12 +1427,12 @@ OpFoldResult cir::SelectOp::fold(FoldAdaptor adaptor) {
 
//===----------------------------------------------------------------------===//
 LogicalResult cir::ShiftOp::verify() {
   mlir::Operation *op = getOperation();
-  mlir::Type resType = getResult().getType();
   const bool isOp0Vec = 
mlir::isa<cir::VectorType>(op->getOperand(0).getType());
   const bool isOp1Vec = 
mlir::isa<cir::VectorType>(op->getOperand(1).getType());
   if (isOp0Vec != isOp1Vec)
     return emitOpError() << "input types cannot be one vector and one scalar";
-  if (isOp1Vec && op->getOperand(1).getType() != resType) {
+
+  if (isOp1Vec && !mlir::isa<cir::VectorType>(getResult().getType())) {
     return emitOpError() << "shift amount must have the type of the result "
                          << "if it is vector shift";
----------------
AmrDeveloper wrote:

Thank you, message updated, and I added a test for it

https://github.com/llvm/llvm-project/pull/141111
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to