[PATCH] D76980: [LegalizeTypes] Add SoftenFloatRes/SoftenFloatOp functions for FREEZE

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 28 14:00:03 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:191
+  return DAG.getNode(ISD::FREEZE, SDLoc(N),
+                     EVT::getIntegerVT(*DAG.getContext(), BitWidth),
+                     N->getOperand(0));
----------------
The type should come from TLI.getTypeToTransformTo


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:192
+                     EVT::getIntegerVT(*DAG.getContext(), BitWidth),
+                     N->getOperand(0));
+}
----------------
You should call GetSoftenedFloat on the operand.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:806
   case ISD::FCOPYSIGN:   Res = SoftenFloatOp_FCOPYSIGN(N); break;
+  case ISD::FREEZE:      Res = SoftenFloatOp_FREEZE(N); break;
   }
----------------
Shouldn't the type of the input to freeze match the output so this shouldn't be needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76980





More information about the llvm-commits mailing list