On Friday, October 08, 2010 3:14:41 pm Ulrich Weigand wrote: > I don't think these are quite right. If, say, arg2 is a vector of > different type, this may get simply cast away. Likewise, if arg1 > is a very short integer type, the cast may actually remove valid > bits in arg2 ... I think the cast really should only be done if > one side is a vector and the other a scalar. Oh, I overlooked that - thanks. > However, I don't quite like distributing the code between the various > promotion routines. In fact, I'm starting to think this shouldn't > actually be though of as a promotion at all. Instead, why not simply > handle the case directly in vector_binop? If only one side is a vector > and the other is a scalar, cast it there. This should simplify the > patch even further. Sounds good. Attached is a new version of the patch. Tested on i686-*-linux- gnu, no regressions. Regards Ken