MaxGraey opened issue #4803:
fneg(fabs(x))could be possible aftercopysign(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, onx64it will be just singleorps xmm, [0x8000000000000000, 0x8000000000000000](pseudocode) instruction.
MaxGraey edited issue #4803:
fneg(fabs(x))could be possible aftercopysign(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, onx64it will be just singleorps xmm, ptr [0x8000000000000000, 0x8000000000000000](pseudocode) instruction.
MaxGraey edited issue #4803:
fneg(fabs(x))could be possible aftercopysign(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 forx64it will be just singleorps xmm, ptr [0x8000000000000000, 0x8000000000000000](pseudocode) instruction.
Last updated: Jan 10 2026 at 20:04 UTC