[PATCH] D73939: [AMDGPU] Fix infinite loop with fma combines

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 18:31:32 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:737-740
+char AMDGPUTargetLowering::isNegatibleForFree(SDValue Op, SelectionDAG &DAG,
+                                              bool LegalOperations,
+                                              bool ForCodeSize,
+                                              unsigned Depth) const {
----------------
My initial thought is it should not be necessary to override this


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:742
+  switch (Op.getOpcode()) {
+    case ISD::FMA: {
+      // Negating a fma is not free if it has users without source mods.
----------------
This is incomplete and FMAD will have the same problem at minimum


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73939





More information about the llvm-commits mailing list