mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 08:08:01 +00:00
Parse shufflevector
llvm-svn: 27511
This commit is contained in:
parent
14b19acd56
commit
97a47d4c9c
@ -277,6 +277,7 @@ getelementptr { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
|
||||
|
||||
extractelement { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
|
||||
insertelement { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
|
||||
shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
|
||||
|
||||
|
||||
{VarID} {
|
||||
|
@ -998,7 +998,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
|
||||
// Other Operators
|
||||
%type <OtherOpVal> ShiftOps
|
||||
%token <OtherOpVal> PHI_TOK CAST SELECT SHL SHR VAARG
|
||||
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT
|
||||
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR
|
||||
%token VAARG_old VANEXT_old //OBSOLETE
|
||||
|
||||
|
||||
@ -2260,6 +2260,11 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
|
||||
ThrowException("Third operand of insertelement must be uint!");
|
||||
$$ = new InsertElementInst($2, $4, $6);
|
||||
}
|
||||
| SHUFFLEVECTOR ResolvedVal ',' ResolvedVal ',' ResolvedVal {
|
||||
if (!ShuffleVectorInst::isValidOperands($2, $4, $6))
|
||||
ThrowException("Invalid shufflevector operands!");
|
||||
$$ = new ShuffleVectorInst($2, $4, $6);
|
||||
}
|
||||
| PHI_TOK PHIList {
|
||||
const Type *Ty = $2->front().first->getType();
|
||||
if (!Ty->isFirstClassType())
|
||||
|
Loading…
Reference in New Issue
Block a user