For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index e4a1eac..3f71158 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1297,10 +1297,10 @@
if ((unsigned)$2 != $2)
GEN_ERROR("Unsigned result not equal to signed result");
if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
- GEN_ERROR("Element type of a PackedType must be primitive");
+ GEN_ERROR("Element type of a VectorType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2");
- $$ = new PATypeHolder(HandleUpRefs(PackedType::get(*$4, (unsigned)$2)));
+ $$ = new PATypeHolder(HandleUpRefs(VectorType::get(*$4, (unsigned)$2)));
delete $4;
CHECK_FOR_ERROR
}
@@ -1481,7 +1481,7 @@
| Types '<' ConstVector '>' { // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
- const PackedType *PTy = dyn_cast<PackedType>($1->get());
+ const VectorType *PTy = dyn_cast<VectorType>($1->get());
if (PTy == 0)
GEN_ERROR("Cannot make packed constant with type: '" +
(*$1)->getDescription() + "'");
@@ -1502,7 +1502,7 @@
(*$3)[i]->getType()->getDescription() + "'.");
}
- $$ = ConstantPacked::get(PTy, *$3);
+ $$ = ConstantVector::get(PTy, *$3);
delete $1; delete $3;
CHECK_FOR_ERROR
}
@@ -1781,8 +1781,8 @@
if ($3->getType() != $5->getType())
GEN_ERROR("Logical operator types must match");
if (!$3->getType()->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($3->getType()) ||
- !cast<PackedType>($3->getType())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($3->getType()) ||
+ !cast<VectorType>($3->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
$$ = ConstantExpr::get($1, $3, $5);
@@ -2232,10 +2232,10 @@
const Type *ETy = (*$2)[0]->getType();
int NumElements = $2->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
HandleUpRefs(
- PackedType::get(
+ VectorType::get(
ETy,
NumElements)
)
@@ -2249,7 +2249,7 @@
(*$2)[i]->getType()->getDescription() + "'.");
}
- $$ = ValID::create(ConstantPacked::get(pt, *$2));
+ $$ = ValID::create(ConstantVector::get(pt, *$2));
delete PTy; delete $2;
CHECK_FOR_ERROR
}
@@ -2585,10 +2585,10 @@
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
- !isa<PackedType>((*$2).get()))
+ !isa<VectorType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>((*$2).get()) &&
+ if (isa<VectorType>((*$2).get()) &&
($1 == Instruction::URem ||
$1 == Instruction::SRem ||
$1 == Instruction::FRem))
@@ -2606,8 +2606,8 @@
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($2->get()) ||
- !cast<PackedType>($2->get())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($2->get()) ||
+ !cast<VectorType>($2->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
Value* tmpVal1 = getVal(*$2, $3);
@@ -2622,7 +2622,7 @@
| ICMP IPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by icmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR
@@ -2635,7 +2635,7 @@
| FCMP FPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by fcmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR