diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 093b30d..910d1db 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -5754,6 +5754,17 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { &Call); break; } + case Intrinsic::aarch64_prefetch: { + Check(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2, + "write argument to llvm.aarch64.prefetch must be 0 or 1", Call); + Check(cast<ConstantInt>(Call.getArgOperand(2))->getZExtValue() < 4, + "target argument to llvm.aarch64.prefetch must be 0-3", Call); + Check(cast<ConstantInt>(Call.getArgOperand(3))->getZExtValue() < 2, + "stream argument to llvm.aarch64.prefetch must be 0 or 1", Call); + Check(cast<ConstantInt>(Call.getArgOperand(4))->getZExtValue() < 2, + "isdata argument to llvm.aarch64.prefetch must be 0 or 1", Call); + break; + } }; } |