[llvm-branch-commits] [llvm] [SelectionDAG] Adaptation for FP operation lowering (PR #138553)
Serge Pavlov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon May 12 09:38:16 PDT 2025
================
@@ -8350,6 +8351,59 @@ void SelectionDAGBuilder::visitConstrainedFPIntrinsic(
setValue(&FPI, FPResult);
}
+void SelectionDAGBuilder::visitFPOperationIntrinsic(const CallInst &CI,
+ unsigned Intrinsic) {
+ SDLoc sdl = getCurSDLoc();
+ bool StrictFP =
+ FuncInfo.Fn->getAttributes().hasFnAttr(llvm::Attribute::StrictFP);
+
+ int Opcode = -1;
+ switch (Intrinsic) {
+#define CONSTRAINED(NAME, DAGN)
+#define FUNCTION(NAME, DAGN) \
+ case Intrinsic::NAME: \
+ Opcode = StrictFP ? ISD::STRICT_##DAGN : ISD::DAGN; \
+ break;
+#include "llvm/IR/FloatingPointOps.def"
+ }
+
+ SDNodeFlags Flags;
+ if (CI.getExceptionBehavior() == fp::ExceptionBehavior::ebIgnore)
+ Flags.setNoFPExcept(true);
----------------
spavloff wrote:
This code was copied from `visitConstrainedFPIntrinsic`. Maybe it should be removed at all.
https://github.com/llvm/llvm-project/pull/138553
More information about the llvm-branch-commits
mailing list