refactoring

llvm-svn: 128427
This commit is contained in:
Anton Yartsev 2011-03-28 21:00:05 +00:00
parent 2d45693446
commit 93900c7d1e
2 changed files with 2 additions and 6 deletions

View File

@ -2119,9 +2119,7 @@ Value *ScalarExprEmitter::EmitCompare(const BinaryOperator *E,unsigned UICmpOpc,
// If AltiVec, the comparison results in a numeric type, so we use
// intrinsics comparing vectors and giving 0 or 1 as a result
if (LHSTy->isVectorType() &&
LHSTy->getAs<VectorType>()->getVectorKind() ==
VectorType::AltiVecVector) {
if (LHSTy->isVectorType() && !E->getType()->isVectorType()) {
// constants for mapping CR6 register bits to predicate result
enum { CR6_EQ=0, CR6_EQ_REV, CR6_LT, CR6_LT_REV } CR6;

View File

@ -7282,9 +7282,7 @@ QualType Sema::CheckVectorCompareOperands(Expr *&lex, Expr *&rex,
// If AltiVec, the comparison results in a numeric type, i.e.
// bool for C++, int for C
if (lType->getAs<VectorType>()->getVectorKind() == VectorType::AltiVecVector
&& rType->getAs<VectorType>()->getVectorKind() ==
VectorType::AltiVecVector)
if (vType->getAs<VectorType>()->getVectorKind() == VectorType::AltiVecVector)
return Context.getLogicalOperationType();
// For non-floating point types, check for self-comparisons of the form