diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-16 06:00:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-16 06:00:36 +0000 |
commit | d3745476dee3a1b86929717e17db2e1ce00bda39 (patch) | |
tree | 50cb87b28e95e24e13695a4f9ec0d43a06acbc19 /lib/VMCore/Verifier.cpp | |
parent | 868510328fc0b25ca97f2fba466a77c2c4e29c45 (diff) | |
download | external_llvm-d3745476dee3a1b86929717e17db2e1ce00bda39.zip external_llvm-d3745476dee3a1b86929717e17db2e1ce00bda39.tar.gz external_llvm-d3745476dee3a1b86929717e17db2e1ce00bda39.tar.bz2 |
Verify prefetch arguments, PR2576.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index affbc9a..3ca9d8c8 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1361,6 +1361,14 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { "llvm.init_trampoline parameter #2 must resolve to a function.", &CI); break; + case Intrinsic::prefetch: + Assert1(isa<ConstantInt>(CI.getOperand(2)) && + isa<ConstantInt>(CI.getOperand(3)) && + cast<ConstantInt>(CI.getOperand(2))->getZExtValue() < 2 && + cast<ConstantInt>(CI.getOperand(3))->getZExtValue() < 4, + "invalid arguments to llvm.prefetch", + &CI); + break; } } |