  Using 1D and 2D particle-in-cell (PIC) simulations of a plasma with a growing
magnetic field $\vec{B}$, we show that ions can be stochastically accelerated
by the ion-cyclotron (IC) instability. As $\vec{B}$ grows, an ion pressure
anisotropy $p_{\perp,i} > p_{||,i}$ arises, due to the adiabatic invariance of
the ion magnetic moment ($p_{||,i}$ and $p_{\perp,i}$ are the ion pressures
parallel and perpendicular to $\vec{B}$). When initially $\beta_i = 0.5$
($\beta_i \equiv 8\pi p_i/|\vec{B}|^2$, where $p_i$ is the ion isotropic
pressure), the pressure anisotropy is limited mainly by inelastic pitch-angle
scattering provided by the IC instability, which in turn produces a non-thermal
tail in the ion energy spectrum. After $\vec{B}$ is amplified by a factor $\sim
2.7$, this tail can be approximated as a power-law of index $\sim 3.4$ plus two
non-thermal bumps, and accounts for $2-3\%$ of the ions and $\sim 18\%$ of
their kinetic energy. On the contrary, when initially $\beta_i =2$, the ion
scattering is dominated by the mirror instability and the acceleration is
suppressed. This implies that efficient ion acceleration requires that
initially $\beta_i \lesssim 1$. Although we focus on cases where $\vec{B}$ is
amplified by plasma shear, we check that the acceleration occurs similarly if
$\vec{B}$ grows due to plasma compression. Our results are valid in a
sub-relativistic regime where the ion thermal energy is $\sim 10\%$ of the ion
rest mass energy. This acceleration process can thus be relevant in the inner
region of low-luminosity accretion flows around black holes.
