In a step towards improving public health in the United States, the FDA announced on June 16 that trans fats must be removed from all processed foods within the next three years. This new regulation may come as a blow to processed food companies, but some such as General Mills, Inc. (NYSE:GIS) and Kraft Foods Group Inc (NASDAQ:KRFT) have protected themselves by preemptively reducing trans fat content in their products.

In a press release, the FDA stated that trans fats are not “generally recognized as safe” for use in human food. Following the three year compliance period, companies will have to seek permission to use trans fats in products.

Stephen Ostroff, M.D. of the FDA commented, “The FDA’s action on this major source of artificial trans fat demonstrates the agency’s commitment to the heart health of all Americans. This action is expected to reduce coronary heart disease and prevent thousands of fatal heart attacks every year.”

Food manufacturers have been required to include information regarding trans fat content on food labels since 2006. The FDA estimates that the consumption of trans fat decreased about 78% between 2003 and 2012 thanks to labelling rules. However, the FDA notes that despite the decrease, the remaining intake of trans fat remains a public health concern.

Public health concerns aside, several big food companies are expected to take a big hit from this legislation. Trans fats are used in foods to extend shelf life and to add texture.

According to Bloomberg, General Mills has reduced the use trans fats in 350 of its products since 2008. It still uses trans fats in Betty Crocker, Bisquick, and Pillsbury products. It is hard for food companies to completely remove trans fats from food products because alternatives do not have the same texture. Replacing trans fats with oils tends to make the product messy, while other alternatives can be costly.

Other food companies such Kraft have been ahead of the curve. When the FDA announced new trans fat labeling laws in 2006, Kraft quickly took initiative and reduced the amount of trans fat in about 650 of its food products, leaving only 2.5% of its products with an amount of trans fat worthy of a label. Kraft achieved this by reformulating trans fat oils with proprietary blends of oils. This allowed Kraft to print that its products have zero grams of trans fats.

Wall Street analysts have yet to weigh in on these food giants in light of new FDA regulations. According to TipRanks, one analyst has an open Hold rating on General Mills and one has an open Sell rating. Out of the seven analysts covering Kraft, three recommend Buy; three recommend Hold; and one recommends to Sell.