mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
Parse shufflevector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00f1023cf8
commit
4c94908b64
@ -277,6 +277,7 @@ getelementptr { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
|
|||||||
|
|
||||||
extractelement { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
|
extractelement { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
|
||||||
insertelement { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
|
insertelement { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
|
||||||
|
shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
|
||||||
|
|
||||||
|
|
||||||
{VarID} {
|
{VarID} {
|
||||||
|
@ -998,7 +998,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
|
|||||||
// Other Operators
|
// Other Operators
|
||||||
%type <OtherOpVal> ShiftOps
|
%type <OtherOpVal> ShiftOps
|
||||||
%token <OtherOpVal> PHI_TOK CAST SELECT SHL SHR VAARG
|
%token <OtherOpVal> PHI_TOK CAST SELECT SHL SHR VAARG
|
||||||
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT
|
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR
|
||||||
%token VAARG_old VANEXT_old //OBSOLETE
|
%token VAARG_old VANEXT_old //OBSOLETE
|
||||||
|
|
||||||
|
|
||||||
@ -2260,6 +2260,11 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
|
|||||||
ThrowException("Third operand of insertelement must be uint!");
|
ThrowException("Third operand of insertelement must be uint!");
|
||||||
$$ = new InsertElementInst($2, $4, $6);
|
$$ = 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 {
|
| PHI_TOK PHIList {
|
||||||
const Type *Ty = $2->front().first->getType();
|
const Type *Ty = $2->front().first->getType();
|
||||||
if (!Ty->isFirstClassType())
|
if (!Ty->isFirstClassType())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user