Arguments of MERGE()

I’ve always assumed that MERGE was introduced to provide backwards compatability with the Cray Conditional Vector Merge cvmg functions. If I remember correctly they also computed both conditions and held them in registers prior to applying the mask condition. They were needed in the early days of vectorization but as Cray’s compilers matured to the point that they could vectorize many of the IF constructs they encountered in vector loops, the CVMG functions were not needed.

1 Like

This is correct. The merge intrinsic is pretty much the same as the Cray cvmgt intrinsic. The Cray versions did have some typing oddities - as the man page you linked to documents.

1 Like