================
@@ -6701,6 +6701,38 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID,
CallBase &Call) {
"isdata argument to llvm.aarch64.prefetch must be 0 or 1", Call);
break;
}
+ case Intrinsic::aarch64_range_prefetch_reg: {
+ Check(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2,
+ "write argument to llvm.aarch64.range.prefetch.reg must be 0 or 1",
+ Call);
+ Check(cast<ConstantInt>(Call.getArgOperand(2))->getZExtValue() < 2,
+ "stream argument to llvm.aarch64.range.prefetch.reg must be 0 or 1",
+ Call);
+ break;
+ }
+ case Intrinsic::aarch64_range_prefetch_imm: {
+ Check(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2,
+ "write argument to llvm.aarch64.range.prefetch.imm must be 0 or 1",
+ Call);
+ Check(cast<ConstantInt>(Call.getArgOperand(2))->getZExtValue() < 2,
+ "stream argument to llvm.aarch64.range.prefetch.imm must be 0 or 1",
+ Call);
+ int Length = cast<ConstantInt>(Call.getArgOperand(3))->getZExtValue();
+ Check(Length > -2049 && Length < 2041,
+ "length argument to llvm.aarch64.range.prefetch.imm must be -2048 - "
+ "2040",
+ Call);
----------------
paulwalker-arm wrote:
As above, I think the range here is too small. Up to you but perhaps using
`isIntN` will make the range more obvious, likewise you could just say "must be
a signed 21-bit integer".
https://github.com/llvm/llvm-project/pull/170490
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits