Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_codegen.c:
+ + if (!(slt = hlsl_new_binary_expr(ctx, HLSL_OP2_SLT, zero, mul))) + return false; + hlsl_block_add_instr(block, slt); + + negate = (expr->op == HLSL_OP2_EQUAL); + break; + } + case HLSL_OP2_GEQUAL: + case HLSL_OP2_LESS: + { + if (!(slt = hlsl_new_binary_expr(ctx, HLSL_OP2_SLT, arg1_cast, arg2_cast))) + return false; + hlsl_block_add_instr(block, slt); + + negate = (expr->op == HLSL_OP2_GEQUAL); I think that's fine too (reproducing the native code opcode by opcode has never been a target of our HLSL compiler), but it seems that SGE also exists and FXC is willing to emit it for `vs_3_0`: https://shader-playground.timjones.io/27b940d613fd9365f083b11bb18139bf, just in case at some point this turns out to be relevant (in theory `<` and `>=` are not exactly one the opposite of the other, because of NaNs, but SM1-3 mostly pretend NaNs do not exist).
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/706#note_64697