[cfe-commits] r128427 - in /cfe/trunk/lib: CodeGen/CGExprScalar.cpp Sema/SemaExpr.cpp
Anton Yartsev
anton.yartsev at gmail.com
Mon Mar 28 14:00:05 PDT 2011
Author: ayartsev
Date: Mon Mar 28 16:00:05 2011
New Revision: 128427
URL: http://llvm.org/viewvc/llvm-project?rev=128427&view=rev
Log:
refactoring
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=128427&r1=128426&r2=128427&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Mon Mar 28 16:00:05 2011
@@ -2119,9 +2119,7 @@
// 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;
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=128427&r1=128426&r2=128427&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Mar 28 16:00:05 2011
@@ -7282,9 +7282,7 @@
// 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
More information about the cfe-commits
mailing list