[llvm-commits] [llvm] r57626 - /llvm/trunk/lib/VMCore/Verifier.cpp
Chris Lattner
sabre at nondot.org
Wed Oct 15 23:00:36 PDT 2008
Author: lattner
Date: Thu Oct 16 01:00:36 2008
New Revision: 57626
URL: http://llvm.org/viewvc/llvm-project?rev=57626&view=rev
Log:
Verify prefetch arguments, PR2576.
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=57626&r1=57625&r2=57626&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Thu Oct 16 01:00:36 2008
@@ -1361,6 +1361,14 @@
"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;
}
}
More information about the llvm-commits
mailing list