[llvm] [DAG] Add generic expansion for ISD::FCANONICALIZE nodes (PR #142105)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 01:12:12 PDT 2025


================
@@ -870,6 +870,9 @@ void TargetLoweringBase::initActions() {
                       ISD::FATAN2},
                      {MVT::f32, MVT::f64, MVT::f128}, Expand);
 
+  // Insert custom handling default for llvm.canonicalize.*.
+  setOperationAction(ISD::FCANONICALIZE, {MVT::f32, MVT::f64}, Expand);
+
----------------
arsenm wrote:

If we'r going to expand by default, it should do it for all types, not just f32/f64

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


More information about the llvm-commits mailing list