OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8685103
)
Verify prefetch arguments, PR2576.
author
Chris Lattner
<sabre@nondot.org>
Thu, 16 Oct 2008 06:00:36 +0000
(06:00 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 16 Oct 2008 06:00:36 +0000
(06:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57626
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Verifier.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Verifier.cpp
b/lib/VMCore/Verifier.cpp
index
affbc9a
..
3ca9d8c
100644
(file)
--- 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;
}
}