[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 7 07:24:05 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
----------------
yronglin wrote:
Should we follow the behavior of current interpreter or go further to implement a short-circuiting here?
I have go through the Clang issue list, and it seems that no users have reported related bugs.
- https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+vector_size+label%3Aclang%3Afrontend
- https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+ext_vector_type+label%3Aclang%3Afrontend
https://github.com/llvm/llvm-project/pull/107678
More information about the cfe-commits
mailing list