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

Dominik Steenken via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 03:09:33 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);
+
----------------
dominik-steenken wrote:

Ok, i have added expansion for `f16` and `f128`. Should i also add other types that are specific to certain platforms, such as `bfloat`, `x86_fp80`, or `ppc_fp128`?

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


More information about the llvm-commits mailing list