Superconductivity enhancement is often associated with phonon softening by doping or external pressure. In this paper, we report L12-type trialuminides Al3V as a typical example belonging to this scenario. The electronic, phononic and superconducting properties have been studied by using the first-principle method. Under uniaxial compression, the superconducting transition temperature Tc of Al3V can be increased from ≈ 1.5 K to its maximum at ≈ 7.3 K when the lattice approaches the structural instability. A detailed investigation of Al3V reveals that the (V: d)-(Al: p) hybrid bands are strongly coupled to the phonon modes with lower frequency. The uniaxial compression induces a significant softening of the phonon mode with non-zero phonon line-width, and yet keeps the electron density of states near the Fermi level unchanged. This leads to a stronger electron-phonon coupling (EPC) and therefore a higher Tc. On the contrary, the L12 structure is more stable against the hydrostatic pressure and the phonon energy actually grows up when the hydrostatic pressure is increased. As a result, EPC becomes weaker and Tc can be reduced to ≤ 0.3 K under high hydrostatic pressure. Our results present an interesting example that superconductivity can enhanced by tuning the softened phonon via pressure or doping.