@@ -1237,9 +1237,13 @@ def ShiftOp : CIR_Op<"shift", [Pure]> {
12371237 ```
12381238 }];
12391239
1240- let results = (outs CIR_AnyIntOrVecOfInt:$result);
1241- let arguments = (ins CIR_AnyIntOrVecOfInt:$value, CIR_AnyIntOrVecOfInt:$amount,
1242- UnitAttr:$isShiftleft);
1240+ let arguments = (ins
1241+ CIR_AnyIntOrVecOfIntType:$value,
1242+ CIR_AnyIntOrVecOfIntType:$amount,
1243+ UnitAttr:$isShiftleft
1244+ );
1245+
1246+ let results = (outs CIR_AnyIntOrVecOfIntType:$result);
12431247
12441248 let assemblyFormat = [{
12451249 `(`
@@ -3125,7 +3129,7 @@ def VecInsertOp : CIR_Op<"vec.insert", [Pure,
31253129
31263130 let arguments = (ins
31273131 CIR_VectorType:$vec,
3128- AnyType :$value,
3132+ CIR_VectorElementType :$value,
31293133 CIR_AnyFundamentalIntType:$index
31303134 );
31313135
@@ -3158,7 +3162,7 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure,
31583162 CIR_AnyFundamentalIntType:$index
31593163 );
31603164
3161- let results = (outs CIR_AnyType :$result);
3165+ let results = (outs CIR_VectorElementType :$result);
31623166
31633167 let assemblyFormat = [{
31643168 $vec `[` $index `:` type($index) `]` attr-dict `:` qualified(type($vec))
@@ -3181,7 +3185,7 @@ def VecCreateOp : CIR_Op<"vec.create", [Pure]> {
31813185 in the vector type.
31823186 }];
31833187
3184- let arguments = (ins Variadic<CIR_AnyType >:$elements);
3188+ let arguments = (ins Variadic<CIR_VectorElementType >:$elements);
31853189 let results = (outs CIR_VectorType:$result);
31863190
31873191 let assemblyFormat = [{
@@ -3211,7 +3215,7 @@ def VecSplatOp : CIR_Op<"vec.splat", [Pure,
32113215 All elements of the vector have the same value, that of the given scalar.
32123216 }];
32133217
3214- let arguments = (ins CIR_AnyType :$value);
3218+ let arguments = (ins CIR_VectorElementType :$value);
32153219 let results = (outs CIR_VectorType:$result);
32163220
32173221 let assemblyFormat = [{
@@ -3264,8 +3268,13 @@ def VecTernaryOp : CIR_Op<"vec.ternary",
32643268 The result is a vector of the same type as the second and third arguments.
32653269 Each element of the result is `(bool)a[n] ? b[n] : c[n]`.
32663270 }];
3267- let arguments = (ins IntegerVector:$cond, CIR_VectorType:$vec1,
3268- CIR_VectorType:$vec2);
3271+
3272+ let arguments = (ins
3273+ CIR_VectorOfIntType:$cond,
3274+ CIR_VectorType:$vec1,
3275+ CIR_VectorType:$vec2
3276+ );
3277+
32693278 let results = (outs CIR_VectorType:$result);
32703279 let assemblyFormat = [{
32713280 `(` $cond `,` $vec1 `,` $vec2 `)` `:` qualified(type($cond)) `,`
@@ -3328,7 +3337,7 @@ def VecShuffleDynamicOp : CIR_Op<"vec.shuffle.dynamic",
33283337 result vector is constructed by taking the elements from the first input
33293338 vector from the indices indicated by the elements of the second vector.
33303339 }];
3331- let arguments = (ins CIR_VectorType:$vec, IntegerVector :$indices);
3340+ let arguments = (ins CIR_VectorType:$vec, CIR_VectorOfIntType :$indices);
33323341 let results = (outs CIR_VectorType:$result);
33333342 let assemblyFormat = [{
33343343 $vec `:` qualified(type($vec)) `,` $indices `:` qualified(type($indices))
@@ -4712,8 +4721,8 @@ def LLrintOp : UnaryFPToIntBuiltinOp<"llrint", "LlrintOp">;
47124721
47134722class UnaryFPToFPBuiltinOp<string mnemonic, string llvmOpName>
47144723 : CIR_Op<mnemonic, [Pure, SameOperandsAndResultType]> {
4715- let arguments = (ins CIR_AnyFloatOrVecOfFloat :$src);
4716- let results = (outs CIR_AnyFloatOrVecOfFloat :$result);
4724+ let arguments = (ins CIR_AnyFloatOrVecOfFloatType :$src);
4725+ let results = (outs CIR_AnyFloatOrVecOfFloatType :$result);
47174726 let summary = "libc builtin equivalent ignoring "
47184727 "floating point exceptions and errno";
47194728 let assemblyFormat = "$src `:` type($src) attr-dict";
@@ -4743,8 +4752,6 @@ def TanOp : UnaryFPToFPBuiltinOp<"tan", "TanOp">;
47434752def TruncOp : UnaryFPToFPBuiltinOp<"trunc", "FTruncOp">;
47444753
47454754def AbsOp : CIR_Op<"abs", [Pure, SameOperandsAndResultType]> {
4746- let arguments = (ins CIR_AnySignedIntOrVecOfSignedInt:$src, UnitAttr:$poison);
4747- let results = (outs CIR_AnySignedIntOrVecOfSignedInt:$result);
47484755 let summary = [{
47494756 libc builtin equivalent abs, labs, llabs
47504757
@@ -4760,6 +4767,14 @@ def AbsOp : CIR_Op<"abs", [Pure, SameOperandsAndResultType]> {
47604767 %2 = cir.abs %3 : !cir.vector<!s32i x 4>
47614768 ```
47624769 }];
4770+
4771+ let arguments = (ins
4772+ CIR_AnySIntOrVecOfSIntType:$src,
4773+ UnitAttr:$poison
4774+ );
4775+
4776+ let results = (outs CIR_AnySIntOrVecOfSIntType:$result);
4777+
47634778 let assemblyFormat = "$src ( `poison` $poison^ )? `:` type($src) attr-dict";
47644779}
47654780
@@ -4769,9 +4784,12 @@ class BinaryFPToFPBuiltinOp<string mnemonic, string llvmOpName>
47694784 libc builtin equivalent ignoring floating-point exceptions and errno.
47704785 }];
47714786
4772- let arguments = (ins CIR_AnyFloatOrVecOfFloat:$lhs,
4773- CIR_AnyFloatOrVecOfFloat:$rhs);
4774- let results = (outs CIR_AnyFloatOrVecOfFloat:$result);
4787+ let arguments = (ins
4788+ CIR_AnyFloatOrVecOfFloatType:$lhs,
4789+ CIR_AnyFloatOrVecOfFloatType:$rhs
4790+ );
4791+
4792+ let results = (outs CIR_AnyFloatOrVecOfFloatType:$result);
47754793
47764794 let assemblyFormat = [{
47774795 $lhs `,` $rhs `:` qualified(type($lhs)) attr-dict
0 commit comments