================
@@ -708,8 +708,37 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo
&TI,
return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 15) ||
SemaRef.BuiltinConstantArgMultiple(TheCall, 0, 4);
}
- case RISCVVector::BI__builtin_rvv_sf_vtzero_t:
- return SemaRef.BuiltinConstantArgRange(TheCall, 0, 0, 15);
+ case RISCVVector::BI__builtin_rvv_sf_vtzero_t: {
+ llvm::APSInt Log2SEWResult;
+ llvm::APSInt TWidenResult;
+ if (SemaRef.BuiltinConstantArg(TheCall, 3, Log2SEWResult) ||
+ SemaRef.BuiltinConstantArg(TheCall, 4, TWidenResult))
+ return true;
+
+ int Log2SEW = Log2SEWResult.getSExtValue();
----------------
topperc wrote:
Should we check for valid values before we use them?
https://github.com/llvm/llvm-project/pull/143070
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits