[PATCH] D111319: [GlobalISel] Combine for eliminating redundant operand negations

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 08:52:46 PDT 2021


foad added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h:620-622
+  /// Transform (fadd x, fneg(y)) -> (fsub x, y)
+  ///           (fadd fneg(x), y) -> (fsub y, x)
+  ///           (fsub x, fneg(y)) -> (fadd x, y)
----------------
Are these definitely safe. even with signed zeros? Does SelectionDAG do the same?


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h:625
+  ///           (fdiv fneg(x), fneg(y)) -> (fdiv x, y)
+  ///           (fmad fneg(x), fneg(y), z) -> (fma x, y, z)
+  ///           (fma fneg(x), fneg(y), z) -> (fma x, y, z)
----------------
Typo "fma".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111319/new/

https://reviews.llvm.org/D111319



More information about the llvm-commits mailing list