================
@@ -1371,10 +1455,27 @@ bool Compiler<Emitter>::VisitVectorBinOp(const 
BinaryOperator *E) {
         return false;
     }
 
+    // If we performed an integer promotion, we need to cast the compute result
+    // into result vector element type.
+    if (NeedIntPromot &&
+        !this->emitPrimCast(PromotT, ResultElemT, VecTy->getElementType(), E))
+      return false;
+
     // Initialize array element with the value we just computed.
     if (!this->emitInitElem(ResultElemT, I, E))
       return false;
   }
+
+  if (E->isCompoundAssignmentOp()) {
+    if (!this->emitGetLocal(PT_Ptr, LHSOffset, E))
+      return false;
+    if (!this->emitFlip(PT_Ptr, PT_Ptr, E))
+      return false;
+    if (!this->emitMemcpy(E))
+      return false;
+    if (!this->emitPopPtr(E))
+      return false;
+  }
----------------
tbaederr wrote:

I don't understand this block - why is the copy necessary?

https://github.com/llvm/llvm-project/pull/108949
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to