diff options
| author | Fangrui Song <maskray@google.com> | 2020-06-08 09:32:30 -0700 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2020-06-08 09:32:30 -0700 |
| commit | fc935fc35bc2f76c4d1ec984a17e9db508a172de (patch) | |
| tree | aec4db0cef2fba47e601a106d8575128266d8159 /clang/lib/CodeGen/CGExprScalar.cpp | |
| parent | 9982d48a92beb35525c50890ae3a96ece3cf8de1 (diff) | |
Reland D80979 [clang] Implement VectorType logic not operator
With a fix to use -triple %itanium_abi_triple
Differential Revision: https://reviews.llvm.org/D80979
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
| -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 4e61349cf4d5..b2bc38b329ef 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2762,7 +2762,9 @@ Value *ScalarExprEmitter::VisitUnaryNot(const UnaryOperator *E) { Value *ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *E) { // Perform vector logical not on comparison with zero vector. - if (E->getType()->isExtVectorType()) { + if (E->getType()->isVectorType() && + E->getType()->castAs<VectorType>()->getVectorKind() == + VectorType::GenericVector) { Value *Oper = Visit(E->getSubExpr()); Value *Zero = llvm::Constant::getNullValue(Oper->getType()); Value *Result; |
