ahatanak added inline comments. ================ Comment at: lib/Sema/SemaExpr.cpp:8084 @@ +8083,3 @@ + *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast); + return LHSType; + } ---------------- My understanding is that, when we have a compound assign like "LHS += RHS", this function (CheckVectorOperands) is supposed to return the result type (LHS + RHS). However, it is returning different types for "<1 x T> += T" and "T += <1 x T>" (the former returns <1 x T> and the latter returns T). Would CheckAssignmentOperands reject the compound statement if you returned the vector type here?
Also, are you planning to allow the same kind of conversions done above for non-compound assignment statements (e.g., <4 x short> += <2 x int>) in the future? https://reviews.llvm.org/D24472 _______________________________________________ cfe-commits mailing list firstname.lastname@example.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits