summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-08 03:55:17 +0000
committerChris Lattner <sabre@nondot.org>2006-04-08 03:55:17 +0000
commitaebccf891a7051dcb9dcc7adbcacda58818d3ed7 (patch)
tree8d1ea6ea52bd2e9890e8143987dba34f1b0a600d /llvm/lib/AsmParser/llvmAsmParser.y.cvs
parent8c32ad0040ad09fe8c4c1732c21a52e5d6cbc466 (diff)
downloadbcm5719-llvm-aebccf891a7051dcb9dcc7adbcacda58818d3ed7.tar.gz
bcm5719-llvm-aebccf891a7051dcb9dcc7adbcacda58818d3ed7.zip
regenerate
llvm-svn: 27521
Diffstat (limited to 'llvm/lib/AsmParser/llvmAsmParser.y.cvs')
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y.cvs13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y.cvs b/llvm/lib/AsmParser/llvmAsmParser.y.cvs
index fd84eae56bb..d95ea31bebe 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y.cvs
+++ b/llvm/lib/AsmParser/llvmAsmParser.y.cvs
@@ -1547,8 +1547,17 @@ ConstExpr: CAST '(' ConstVal TO Types ')' {
if ($5->getType() != Type::UIntTy)
ThrowException("Second operand of extractelement must be uint!");
$$ = ConstantExpr::getExtractElement($3, $5);
+ }
+ | INSERTELEMENT '(' ConstVal ',' ConstVal ',' ConstVal ')' {
+ $$ = ConstantExpr::getInsertElement($3, $5, $7);
+ }
+ | SHUFFLEVECTOR '(' ConstVal ',' ConstVal ',' ConstVal ')' {
+ if (!ShuffleVectorInst::isValidOperands($3, $5, $7))
+ ThrowException("Invalid shufflevector operands!");
+ $$ = ConstantExpr::getShuffleVector($3, $5, $7);
};
+
// ConstVector - A list of comma separated constants.
ConstVector : ConstVector ',' ConstVal {
($$ = $1)->push_back($3);
@@ -2261,8 +2270,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
$$ = new InsertElementInst($2, $4, $6);
}
| SHUFFLEVECTOR ResolvedVal ',' ResolvedVal ',' ResolvedVal {
- if (!ShuffleVectorInst::isValidOperands($2, $4, $6))
- ThrowException("Invalid shufflevector operands!");
+ if (!ShuffleVectorInst::isValidOperands($2, $4, $6))
+ ThrowException("Invalid shufflevector operands!");
$$ = new ShuffleVectorInst($2, $4, $6);
}
| PHI_TOK PHIList {
OpenPOWER on IntegriCloud