[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 7 22:35:01 PDT 2024


================
@@ -1300,6 +1309,16 @@ bool Compiler<Emitter>::VisitVectorBinOp(const BinaryOperator *E) {
       if (!this->emitGT(ElemT, E))
         return false;
       break;
+    case BO_LAnd:
+      // a && b is equivalent to a!=0 & b!=0
----------------
tbaederr wrote:

Not sure how one would implement short-circuiting if a vector can't be converted to a bool. Following what the current interpreter does is fine.

https://github.com/llvm/llvm-project/pull/107678


More information about the cfe-commits mailing list