diff options
| author | Anton Yartsev <anton.yartsev@gmail.com> | 2011-03-27 15:36:07 +0000 |
|---|---|---|
| committer | Anton Yartsev <anton.yartsev@gmail.com> | 2011-03-27 15:36:07 +0000 |
| commit | 530deb9a3900b3aea4fa0ad2b7f2837b5a22689f (patch) | |
| tree | 515888b97fd9179fe003a3c8770098d42e5ff2b5 /clang/lib/CodeGen | |
| parent | 1f90da127f7f2b882ac8bd25e45a4e7b0b359b20 (diff) | |
| download | bcm5719-llvm-530deb9a3900b3aea4fa0ad2b7f2837b5a22689f.tar.gz bcm5719-llvm-530deb9a3900b3aea4fa0ad2b7f2837b5a22689f.zip | |
AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347.
llvm-svn: 128381
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 27b868974d5..c6a5a40d768 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2119,7 +2119,9 @@ 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() && CGF.getContext().getLangOptions().AltiVec) { + if (LHSTy->isVectorType() && + LHSTy->getAs<VectorType>()->getVectorKind() == + VectorType::AltiVecVector) { // constants for mapping CR6 register bits to predicate result enum { CR6_EQ=0, CR6_EQ_REV, CR6_LT, CR6_LT_REV } CR6; |

