Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a03517078f7e2286420e5b0091cf78469a444695
      
https://github.com/WebKit/WebKit/commit/a03517078f7e2286420e5b0091cf78469a444695
  Author: Keith Miller <[email protected]>
  Date:   2026-04-22 (Wed, 22 Apr 2026)

  Changed paths:
    A JSTests/wasm/stress/fmin-fmax-constant-fold.js
    M Source/JavaScriptCore/wasm/WasmBBQJIT.h

  Log Message:
  -----------
  [BBQ] floating point min/max handle negative zero incorrectly
https://bugs.webkit.org/show_bug.cgi?id=312689
rdar://175122289

Reviewed by Dan Hecht.

The BBQ JIT's computeFloatingPointMinOrMax used std::min/std::max for
constant folding f32.min, f32.max, f64.min, and f64.max. Because
+0.0 == -0.0 in IEEE 754, std::min/std::max return the first argument
when operands are equal, producing the wrong sign for opposite-sign
zeros. This differed from IPInt and OMG's results for the same
operation.

Replace with Math::fMin/fMax from MathCommon.h which already handle
both NaN propagation and opposite-sign zeros correctly.

Test: JSTests/wasm/stress/fmin-fmax-constant-fold.js
Canonical link: https://commits.webkit.org/311790@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to