U.S. stocks rose slightly on Wednesday on gains in commodity prices and renewed merger and acquisition activity.

U.S. industrial production rose for the second straight month in August, while higher gasoline costs pushed up consumer prices, reinforcing hopes a recovery was underway.

It's particularly encouraging to see the manufacturing sector of the economy recover, said Hugh Johnson, chief investment officer of Johnson Illington Advisors in Albany, NY.

It's like all the other numbers we've seen in that they've been better than expected, and that's what bull markets are all about.

The Dow Jones industrial average <.DJI> gained 18.21 points, or 0.19 percent, to 9,701.62. The Standard & Poor's 500 Index <.SPX> rose 2.49 points, or 0.24 percent, to 1,055.12. The Nasdaq Composite Index <.IXIC> added 5.95 points, or 0.28 percent, to 2,108.59.

The S&P hit a new high for the year shortly after the open, and is now up 56 percent from the March 9 low.

Adobe Systems Inc said it plans to pay $1.8 billion for fast-growing business software maker Omniture Inc as Adobe, the maker of Photoshop and Acrobat looks to turn around declining sales.

Adobe shares fell 6.6 percent to $33.26, while Omniture shares surged 26 percent to $21.82.

M&A activity is considered a positive sign for the economy as businesses display confidence in their capital positions and begin to spend.

Gold hit an 18-month high of $1,020.50 an ounce and helped lift silver and platinum to multi-month peaks. Freeport McMoRan Copper & Gold Inc shares rose 1.5 percent to $72.37.

Genworth Financial Inc climbed 6 percent to $12.76 a day after it priced a common share offering.

Rogers Corp rose 7.7 percent to $29.09 after the maker of specialty materials for electronics and consumer markets raised its outlook, citing strong performance in its printed circuit materials and high performance foams segments.

Verizon Communications Inc capped gains on the Dow, down 2.6 percent to $30.20. UBS downgraded the stock to neutral from buy, saying the telecommunications company is likely to miss its outlook for 2009 earnings growth.

Corning Inc dropped 2.2 percent to $15.45 after it said it acquired all of the outstanding shares of Axygen Bioscience and its subsidiaries from American Capital Ltd for $400 million. American Capital jumped 30 percent to $3.35.

(Reporting by Chuck Mikolajczak; editing by Jeffrey Benkoe)