For float compares (compareFloat32x4 and compareFloat32x4 masm abstractions) the architecture has `=`, `<`, `<=`, and `!=` but not `>` or `>=`. Currently we swap operands in masm to synthesize the missing operators, and that looks clean, *but* in `vcmpps()` in Assembler-x86-shared.h there are additional hacks to move operands around and use temp regs for this if some conditions hold (and I expect they commonly do), it's all pretty ugly. By swapping operations during lowering (at the latest), we can perhaps avoid this. Closely related to bug 1640662.
Bug 1641641 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
For float compares (compareFloat32x4 and compareFloat32x4 masm abstractions) the architecture has `=`, `<`, `<=`, and `!=` but not `>` or `>=`. Currently we swap operands in masm to synthesize the missing operators, and that looks clean, *but* in `vcmpps()` in Assembler-x86-shared.h there are additional hacks to move operands around and use temp regs for this if some conditions hold (and I expect they commonly do), it's all pretty ugly. By swapping operations during lowering (at the latest), we can perhaps avoid this. For int compares, we have `=` and `>` and we can synthesize the others by swapping operands and/or negating the result. Swapping the operands in masm is not always clean and lowering should do a better job setting things up for good code generation. Closely related to bug 1640662.