aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-31 09:53:26 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-31 09:53:26 -0700
commit99c2f236a1a09b6c550e91b71dabbbb0e634ea37 (patch)
tree43673bef9358dbb6626e438f1fbeaab079884b83 /lib/Analysis
parent381b0fb87f1fe806d678af8c48b67b4e0dc3a43b (diff)
PNaCl ABI checker: Disallow ExtractValue and InsertValue instructions
Uses of these are removed by ExpandMulWithOverflow and ExpandStructRegs. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/15995005
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
index d1d5f38405..ad01ae58a2 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
@@ -102,6 +102,9 @@ bool PNaClABIVerifyFunctions::runOnFunction(Function &F) {
case Instruction::ExtractElement:
case Instruction::InsertElement:
case Instruction::ShuffleVector:
+ // ExtractValue and InsertValue operate on struct values.
+ case Instruction::ExtractValue:
+ case Instruction::InsertValue:
Reporter->addError() << "Function " << F.getName() <<
" has disallowed instruction: " <<
BBI->getOpcodeName() << "\n";
@@ -132,8 +135,6 @@ bool PNaClABIVerifyFunctions::runOnFunction(Function &F) {
case Instruction::And:
case Instruction::Or:
case Instruction::Xor:
- case Instruction::ExtractValue:
- case Instruction::InsertValue:
// Memory instructions
case Instruction::Alloca:
case Instruction::Load: