Remove rather oddly merged logic from AArch64 commit.

We seem to have ended up with both an inlined check of permitted NEON base
types and a call to a function.

Since the outer if was (I believe) strictly weaker than the one in the
function, there's no actual user-visible behaviour change, so no tests.

llvm-svn: 187652
This commit is contained in:
Tim Northover 2013-08-02 11:38:46 +00:00
parent cf708c3284
commit 0389d883fc
1 changed files with 7 additions and 21 deletions

View File

@ -4668,20 +4668,6 @@ static void HandleNeonVectorTypeAttr(QualType& CurType,
return; return;
} }
// Only certain element types are supported for Neon vectors. // Only certain element types are supported for Neon vectors.
const BuiltinType* BTy = CurType->getAs<BuiltinType>();
if (!BTy ||
(VecKind == VectorType::NeonPolyVector &&
BTy->getKind() != BuiltinType::SChar &&
BTy->getKind() != BuiltinType::Short) ||
(BTy->getKind() != BuiltinType::SChar &&
BTy->getKind() != BuiltinType::UChar &&
BTy->getKind() != BuiltinType::Short &&
BTy->getKind() != BuiltinType::UShort &&
BTy->getKind() != BuiltinType::Int &&
BTy->getKind() != BuiltinType::UInt &&
BTy->getKind() != BuiltinType::LongLong &&
BTy->getKind() != BuiltinType::ULongLong &&
BTy->getKind() != BuiltinType::Float)) {
llvm::Triple::ArchType Arch = llvm::Triple::ArchType Arch =
S.Context.getTargetInfo().getTriple().getArch(); S.Context.getTargetInfo().getTriple().getArch();
if (!isPermittedNeonBaseType(CurType, VecKind, if (!isPermittedNeonBaseType(CurType, VecKind,
@ -4690,7 +4676,7 @@ static void HandleNeonVectorTypeAttr(QualType& CurType,
Attr.setInvalid(); Attr.setInvalid();
return; return;
} }
}
// The total size of the vector must be 64 or 128 bits. // The total size of the vector must be 64 or 128 bits.
unsigned typeSize = static_cast<unsigned>(S.Context.getTypeSize(CurType)); unsigned typeSize = static_cast<unsigned>(S.Context.getTypeSize(CurType));
unsigned numElts = static_cast<unsigned>(numEltsInt.getZExtValue()); unsigned numElts = static_cast<unsigned>(numEltsInt.getZExtValue());