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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 18:16:40 PDT 2025


================
@@ -423,7 +423,7 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
   setOperationAction({ISD::LRINT, ISD::LLRINT}, {MVT::f16, MVT::f32, MVT::f64},
                      Expand);
 
-  setOperationAction(ISD::FREM, {MVT::f16, MVT::f32, MVT::f64}, Expand);
+  setOperationAction(ISD::FREM, {MVT::f16, MVT::f32, MVT::f64}, LibCall);
----------------
arsenm wrote:

Expand is the correct action. Every other target should be using LibCall. I.e. change the default action to Libcall. This is another stalled migration, Expand should imply emit standalone code that doesn't depend on a function 

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


More information about the llvm-commits mailing list