Support for floating point conditional moves on Intel with SSE

Description

Since moving to SSE2 we never implemented floating point conditional move code, that is floating point compares controlling integer conditional moves and floating point compares controlling floating point conditional moves. SSE2 doesn't have conditional moves but the same effect can be had using compare and mask instructions, e.g.:

z = x < y ? a : b;

becomes in operations in Intel SSE2:

temp = a; // MOVSD
z = x; // MOVSD
z = z < y ? -1 : 0; // CMPLTSD
temp = temp & z; // ANDPD
z = (~z) & b; // ANDNPD
z = z | temp; // ORPD

Environment

None

Assignee

Ian Rogers

Reporter

Ian Rogers

Labels

None

Fix versions

Priority

Medium
Configure