llvm
44cffbe5 - [RISCV] Propagate SDNode flags when combining `(fmul (fneg X), ...)` (#169460)

Commit
137 days ago
[RISCV] Propagate SDNode flags when combining `(fmul (fneg X), ...)` (#169460) In #157388, we turned `(fmul (fneg X), Y)` into `(fneg (fmul X, Y))`. However, we forgot to propagate SDNode flags, specifically fast math flags, from the original FMUL to the new one. This hinders some of the subsequent (FMA) DAG combiner patterns that relied on the contraction flag and as a consequence, missed some of the opportunities to generate negation FMA instructions like `fnmadd`. This patch fixes this issue by propagating the flags. --------- Co-authored-by: Craig Topper <craig.topper@sifive.com>
Author
Parents
Loading