U.S. stocks rose on Wednesday as improving prospects for manufacturing around the world suggested the global economy was recovering.

U.S. manufacturing contracted less than expected in June, underscoring growing sentiment among investors that corporate profits will benefit from the recovery. U.S. earnings season gets into gear next week.

General Mills , the maker of Cheerios cereal, gave investors more reason to be optimistic about the economy after the food company forecast better-than-expected earnings for the current fiscal year, and its stock rose 3.3 percent to $57.89. The S&P Consumer Staples sector <.GSPS> advanced 2.1 percent.

In the latest readings on the global economy, surveys from Europe showed manufacturing was shrinking less than initially thought and in China's case, growing modestly.

Prospects of a better world economy lifted commodity prices, boosting stocks in the energy and materials sectors. Shares of Chevron Corp rose 0.6 percent to $66.69 while Alcoa Inc gained 1.7 percent to $10.50.

For several weeks, we've seen some stronger economic numbers in Europe and China, said Janna Sampson, co-chief investment officer at OakBrook Investments in Lisle, Illinois. And in the U.S., (things) are not as bad as what people were thinking.

The Dow Jones industrial average <.DJI> added 100.82 points, or 1.19 percent, to 8,547.82. The Standard & Poor's 500 Index <.SPX> gained 9.56 points, or 1.04 percent, to 928.88. The Nasdaq Composite Index <.IXIC> rose 21.75 points, or 1.19 percent, to 1,856.79.

The S&P 500 on Tuesday ended its best quarter in more than a decade, but the index is up only 2.8 percent for the year.

In more economic news, the ADP Employer Services payroll report showed private employers cut 473,000 jobs in June, but global outplacement consultancy Challenger, Gray & Christmas data showed planned layoffs at U.S. firms fell to a 15-month low in June.

(Editing by Jan Paschal)