[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 01:30:08 PDT 2024


================
@@ -1267,12 +1267,8 @@ bool Compiler<Emitter>::VisitVectorBinOp(const BinaryOperator *E) {
   assert(E->getLHS()->getType()->isVectorType());
   assert(E->getRHS()->getType()->isVectorType());
 
-  // FIXME: Current only support comparison binary operator, add support for
-  // other binary operator.
-  if (!E->isComparisonOp() && !E->isLogicalOp())
-    return this->emitInvalid(E);
   // Prepare storage for result.
-  if (!Initializing) {
+  if (!Initializing || E->isCompoundAssignmentOp()) {
----------------
tbaederr wrote:

I guess it works, but it would be better if we didn't have to create the temporary in the first place of course; can you try without it?

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


More information about the cfe-commits mailing list