Stream: git-wasmtime

Topic: wasmtime / issue #4803 [cranelift] Folding fneg + fabs


view this post on Zulip Wasmtime GitHub notifications bot (Aug 29 2022 at 12:08):

MaxGraey opened issue #4803:

fneg(fabs(x)) could be possible after copysign(x, -C) -> fneg(fabs(x)) peephole optimization on LLVM / Binaryen, so I guess it's make sense to simplify it further on cranelift during lowering stage for all archs. For example, on x64 it will be just single orps xmm, [0x8000000000000000, 0x8000000000000000] (pseudocode) instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 29 2022 at 12:21):

MaxGraey edited issue #4803:

fneg(fabs(x)) could be possible after copysign(x, -C) -> fneg(fabs(x)) peephole optimization on LLVM / Binaryen, so I guess it's make sense to simplify it further on cranelift during lowering stage for all archs. For example, on x64 it will be just single orps xmm, ptr [0x8000000000000000, 0x8000000000000000] (pseudocode) instruction.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 29 2022 at 12:28):

MaxGraey edited issue #4803:

fneg(fabs(x)) could be possible after copysign(x, -C) -> fneg(fabs(x)) peephole optimization on LLVM / Binaryen, so I guess it's make sense to simplify it further on cranelift during lowering stage for x64 it will be just single orps xmm, ptr [0x8000000000000000, 0x8000000000000000] (pseudocode) instruction.


Last updated: Dec 23 2024 at 12:05 UTC