As a constantly developing innovative technology, Intelligent Reflecting Surface (IRS) has injected new vitality and motivation into the Intelligent Transportation System (ITS). IRS can improve energy efficiency and reduce the hardware costs of wireless communication systems. Aiming at the Vehicle-to-Vehicle (V2V) communication system model under the framework of Internet of Vehicles (IoV), a joint beamforming design method assisted by IRS was proposed, in which, a transmit power minimization problem is formulated with the constraint of ensuring the secure communication of legitimate V2V users and the limit of IRS unit response. In order to address the non-convex optimization problem with multivariate coupling, the alternating optimization and semi-definite relaxation algorithms are used to realize the optimal design of precoding beamforming for the transmitter and IRS phase shift matrix. Simulation results show that compared with other benchmark schemes, the proposed algorithm can achieve lower transmission power under the same secure transmission conditions. Interestingly, there exists a suitable vehicle speed with which the transmit power can be lowest if we set other system parameters or performance requirements.