Suppose $f \colon \mathbb{R}^n \to \mathbb{R}$ is Morse and has finitely many critical points. Is there an algorithm for determining whether there exists a saddle-saddle connection (an orbit of grad $f$ that connects two saddle points)?

**Edit:** As mentioned in the comments, the above problem is not decidable algorithmically unless certain conditions are imposed on $f$.

Consider the following example from

Chicone, Carmen C. "Quadratic gradients on the plane are generically Morse-Smale." Journal of Differential Equations 33.2 (1979): 159-166.

Let $f = x^3 + y^3 - 2xy^2 + x^2 - y^2$, then the vector field grad $f$ is shown below.

The points (0, 0), (-2/3, 0) and (-2, -2) are hyperbolic saddles and (-4/5, -2/5) is a hyperbolic sink. The saddles (0, 0) and (-2/3, 0) are connected by a separatrix along the $x$-axis.

In this example, the algorithm would take $f$ as input and output true.

In the case where $f$ is a cubic polynomial in two variables, the reference given above states

If grad $f$ has a saddle connection then the connecting orbit lies on a straight line.

Certainly, this makes it easy to check whether a saddle connection exists.

My question is: are there any other references that show a specific function $f \colon \mathbb{R}^n \to \mathbb{R}$ is Morse-Smale; that is, the saddle connections can easily be broken (so the transversality condition holds)?

Specifically, I am looking at rational functions $f$ whose numerator is a polynomial and whose denominator is nowhere zero.