Time-dependent CP violation is measured in the $B^0rightarrow J/psipi^+pi^-$ channel for each $pi^+pi^-$ resonant final state using data collected with an integrated luminosity of 3.0 fb$^{-1}$ in $pp$ collisions using the LHCb detector. The final state with the largest rate, $J/psirho^0(770)$, is used to measure the CP-violating angle $2beta^{rm eff}$ to be $(41.7pm 9.6_{-6.3}^{+2.8})^{circ}$. This result can be used to limit the size of penguin amplitude contributions to CP violation measurements in, for example, $B_s^0rightarrow J/psiphi$ decays. Assuming approximate SU(3) flavour symmetry and neglecting higher order diagrams, the shift in the CP-violating phase $phi_s$ is limited to be within the interval [$-1.05^circ$, +$1.18^circ$] at 95% confidence level. Changes to the limit due to SU(3) symmetry breaking effects are also discussed.