[llvm] [RISCV] Undo fneg (fmul x, y) -> fmul x, (fneg y) transform (PR #157388)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 00:59:38 PDT 2025
lukel97 wrote:
> > This also causes some more fnegs to be sunk after a bitcast to integer, so they're now done as xor.
>
> Why is that, if the transform is for a single use of fneg in fmul?
We go from `bitcast (fmul (fneg)) -> bitcast (fneg (fmul))`, and then there's a generic DAGCombine that does `(bitconvert (fneg x)) -> (xor (bitconvert x), signbit)` in `DAGCombiner::visitBITCAST`
https://github.com/llvm/llvm-project/pull/157388
More information about the llvm-commits
mailing list