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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 07:38:10 PDT 2025


================
@@ -74,11 +74,63 @@ class FRemExpander {
   /// Constant 1 of type \p ExTy.
   Value *One;
 
+  /// The frem argument/return types that can be expanded by this class.
+  // TODO The expansion could work for other floating point types
+  // as well, but this would require additional testing.
+  inline static const SmallVector<MVT, 3> ExpandableTypes{MVT::f16, MVT::f32,
+                                                          MVT::f64};
+
+  /// Libcalls for frem instructions of the type at the corresponding
+  /// positions of ExpandableTypes.
+  inline static const SmallVector<RTLIB::Libcall, 3> FremLibcalls{
----------------
arsenm wrote:

ditto 

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


More information about the llvm-commits mailing list