Yes. To a large extent, the length of a semiauto barrel is related to the reliable functioning of the arm. It depends on what action is used: short recoil, blowback, semi-locked breech, or gas operation.
For specific firearms like the HK-91/G-3 series assault rifles, the length of the barrel is specific to reliable operation of the semi-locked blowback action. Shortening the barrel can actually overstress the breech and cause a blowup. Shortening the barrel of a gas operated rifle or shotgun is almost guaranteed to reduce reliability. The full recoil stroke depends on "dwell" or time the projectile is in the barrel. Short-recoil actions like the classic Browning are less affected by reducing barrel length.
Gas operated actions are probably almost as forgiving. The Remington 1100 for example, was made in sporting and riot gun models, and the differences were in gas port sizes.
The defining point is probably asking if a riot gun model of that action is made. If the answer is "yes" then shortening the long barrel probably will do no harm.