emit_x64_vector_floating_point: Remove erroneous AVX512 implementation in EmitFPVectorMinMax

This commit is contained in:
Merry 2022-12-29 15:06:42 +00:00
parent 8371465690
commit c8cd37898b

View file

@ -1027,14 +1027,9 @@ static void EmitFPVectorMinMax(BlockOfCode& code, EmitContext& ctx, IR::Inst* in
// x86-64 treats differently signed zeros as equal while ARM does not. // x86-64 treats differently signed zeros as equal while ARM does not.
// Thus if we AND together things that x86-64 thinks are equal we'll get the positive zero. // Thus if we AND together things that x86-64 thinks are equal we'll get the positive zero.
if (code.HasHostFeature(HostFeature::AVX512_OrthoFloat)) { // vrangep{s,d} here ends up not being significantly shorter than the AVX implementation
// vrangep{s,d} will already correctly handle comparing
// signed zeros similar to ARM if (code.HasHostFeature(HostFeature::AVX)) {
// max(+0.0, -0.0) = +0.0.
// min(+0.0, -0.0) = -0.0
constexpr FpRangeSelect range_select = is_max ? FpRangeSelect::Max : FpRangeSelect::Min;
FCODE(vrangep)(result, result, xmm_b, FpRangeLUT(range_select, FpRangeSign::Preserve));
} else if (code.HasHostFeature(HostFeature::AVX)) {
FCODE(vcmpeqp)(mask, result, xmm_b); FCODE(vcmpeqp)(mask, result, xmm_b);
if constexpr (is_max) { if constexpr (is_max) {
FCODE(vandp)(eq, result, xmm_b); FCODE(vandp)(eq, result, xmm_b);