The gemara says that there was a gezeiras Chamonaim not to raise pigs because of a ma'aseh that occurred when they placed a pig in the basket that was meant for korbanos. Tosafos asks, even without this special gezeira, there is an issur to do business with any non-kosher livestock. Rabbeinu Tam answers that the prohibition to do business with non-kosher livestock is only when they are meant for food, but the issur on pigs is for any purpose. It isn't clear from Tosafos whether the nature of this issur of doing sechorah with non-kosher animals is d'oraysa or d'rabonon. Although Tosafos quotes a pasuk, it may only be an esmachta. However, the nimukei yosef writes explicitly: דאילו לצורך אכילה מדאורייתא אסור לעשות סחורה בכל דבר טמא
From the fact that Tosasfos question is, "why do we need a special issur on pigs, there is a more general issur on all non-kosher animals", rather than asking "why do we need a gezeira chamonaim, pigs are already included in a more general issur d'oraysa", implies that they hold it is only d'rabonon [but tosafos in pesachim says it is d'oraysa].
This is a major discussion in the Taz (y.d. 117:1). Initially the Taz quotes the Rashba who says that it is assur to do business with non-kosher animals because of a gezeira that you may come to eat it, implying that it is d'rabonon. He asks that the gemara in Pesachim 23 implies that it is d'oraysa, and suggests that maybe this is similar to what the gemara says in chagiga 18a about work on chol hamoed; due to a contradiction in pesukim the chazal have the ability to interpret the d'oraysa and decide what is assur and what is mutar. They decided to be magdir the issur based on the concern that one may come to eat it. But, he then quotes the opinion of Terumas Hadeshen and other who state explicitly that it is only d'rabonon (from there he is compelled to say his famous chiddush that something which is explicit in the torah, chazal wouldn't be gozer on).
What is the nafka mina whether the issur is d'oraysa like the nimukei yosef says, or d'rabonon as the taz concludes? The Mishneh l'melech (cited by beis meir) says that a safeik issur would be assur if it would be d'oraysa but mutar if it is only d'rabonon. It would seem that another difference would be whether one can invest without being actively involved (such as owning significant shares in a non-kosher restaurant). If it would be assur d'oraysa, it would seem that the issur is to benefit from issur achila and would be assur, but if the concern was just that he may come to eat it, it should be mutar since he is not at all involved with it. But, R' Shlomo Eiger writes(quoting d'var shmuel) that even if the issur is only d'rabonon out of concern you may come to eat it, it is still assur to invest because chazal made a lo p'lug - no distinction when they created the issur.
The Shach (1) raises a question whether or not it would be permitted to do business with livestock that is meant for eating, but the jew is not selling it for food. For example, if one would sell shellfish like lobster that is normally eaten for the purpose of making soap. Tosafos (by us) says that it is permitted, but the rashbah who says the concern is that one may come to eat it, implies that it is assur since even if his purpose is not for food he may come to eat it. The Shach (2) also suggests that the nature of this prohibition may be a chashad/ma'aris ayin type issur, in which case it would be mutar if it is not for the purpose of food.
The Mateh Yehonasan (R' Yehonasan Eibischitz) has a brilliant approach, combining the rashba of the taz and the rashba of the shach, to prove that the rashba holds the issur is only d'rabonon. Tosafos is trying to explain why we need a special gezeira on not raising pigs, which compels them to say that if it is being sold for the purpose of food it is assur due to sechorah, but if it is being sold for a non-food purpose, even if it is usually eaten, it would be mutar - except for pigs that they made a special gezeira on. Now, according to the rashba (as understood by shach) that if it is usually eaten it is always assur, then pigs which are certainly eaten should have been assur anyway and shouldn't need a special gezeira - so Tosafos question would return in full force. This would be a problem if we assume the issur of sechorah is d'oraysa as the nimukei yosef says. But we can explain the opinion of the rashba (as understood by shach), if he holds that the issur sechorah is only assur d'rabonon (as the taz understands from the rashba). It is very possible that the gezeira on pigs which was at the time of the chashmonaim predated the more general gezeira against doing business, which would circumvent Tosafos question. Based on this pilpul the Rashba must hold that the issur sechorah is only d'rabonon, not d'oraysa (as the Taz understood in the end).