[llvm] [CodeGen] expand-fp: Change frem expansion criterion (PR #158285)

Frederik Harwath via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 02:17:30 PST 2025


================
@@ -587,7 +587,7 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
       setOperationAction(ISD::FSIN, VT, Expand);
       setOperationAction(ISD::FCOS, VT, Expand);
       setOperationAction(ISD::FSINCOS, VT, Expand);
-      setOperationAction(ISD::FREM, VT, Expand);
+      setOperationAction(ISD::FREM, VT, LibCall);
----------------
frederik-h wrote:

I agree that its strange to make an exception for FREM. I definitely felt an urge to add a comment explaining why it is being handled differently. I could try to unify the handling for all relevant instructions. Perhaps this could be left to a follow-up PR?

https://github.com/llvm/llvm-project/pull/158285


More information about the llvm-commits mailing list