--- ./src/core/SkVM.cpp.sav 2020-04-06 12:42:22.976205876 +0200 +++ ./src/core/SkVM.cpp 2020-04-06 12:50:57.465941063 +0200 @@ -1162,7 +1162,7 @@ namespace skvm { // Map min channel to 0, max channel to s, and scale the middle proportionally. auto scale = [&](auto c) { // TODO: better to divide and check for non-finite result? - return select(sat == 0.0f, 0.0f + return select(eq_op(0.0f, sat), 0.0f , ((c - mn) * s) / sat); }; *r = scale(*r); --- ./src/core/SkVM.h.sav 2020-04-06 12:08:50.833128845 +0200 +++ ./src/core/SkVM.h 2020-04-06 12:51:13.369987701 +0200 @@ -875,6 +875,7 @@ namespace skvm { static inline I32 operator==(F32 x, F32a y) { return x->eq(x,y); } static inline I32 operator==(float x, F32 y) { return y->eq(x,y); } + static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); } static inline I32 operator!=(F32 x, F32a y) { return x->neq(x,y); } static inline I32 operator!=(float x, F32 y) { return y->neq(x,y); }