math: fix spurious overflow in pow with clang
clang does not support c99 fenv_access and may move fp operations out of conditional blocks causing unconditional fenv side-effects. Here if (cond) ix = f (x * 0x1p52); was transformed to ix_ = f (x * 0x1p52); ix = cond ? ix_ : ix; where x can be a huge negative value so the mul overflows. The added barrier should prevent such transformation by significantly increasing the cost of doing the mul unconditionally. Found by enh from google on android arm and aarch64 targets. Fixes github issue #16.
Loading
Please register or sign in to comment