================ @@ -1222,6 +1224,117 @@ bool Compiler<Emitter>::VisitComplexBinOp(const BinaryOperator *E) { return true; } +template <class Emitter> +bool Compiler<Emitter>::VisitVectorBinOp(const BinaryOperator *E) { + assert(E->getType()->isVectorType()); + + // FIXME: Current only support comparison binary operator, add support for + // other binary operator. + if (!E->isComparisonOp()) + return this->emitInvalid(E); + // Prepare storage for result. + if (!Initializing) { + unsigned LocalIndex = allocateTemporary(E); + if (!this->emitGetPtrLocal(LocalIndex, E)) + return false; + } + + const Expr *LHS = E->getLHS(); + const Expr *RHS = E->getRHS(); + const auto *VecTy = E->getType()->getAs<VectorType>(); + + // The LHS and RHS of a comparison operator must have the same type. So we ---------------- tbaederr wrote:
Add an assertion if that's the case. https://github.com/llvm/llvm-project/pull/107258 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits