U.S. stocks rose on Wednesday as government data showed a rise in consumer spending and suggested that companies may start to rebuild inventories, even as the economy contracted more than expected in the first quarter.

The gains were broad, with shares of big manufacturers like Boeing and United Technologies up 3 percent each, helping to lead the Dow's advance.

Government data showed gross domestic product dropped at a 6.1 percent annual rate in the first quarter, more than expected. But consumer spending rose and a decline in inventories was deemed good news by strategists as it suggested manufacturers and retailers will have to stock up in merchandise.

We're seeing a lot of strength across the board and a fundamental shift over the short term, said Tim Smalls, head of U.S. stock trading at Execution LLC in Greenwich, Connecticut.

News and economic releases are being viewed with a more positive hand. The market has responded very positively to earnings, guidance and economic data.

The Dow Jones industrial average <.DJI> rose 146.63 points, or 1.83 percent, to 8,163.58. The Standard & Poor's 500 Index <.SPX> added 16.86 points, or 1.97 percent, to 872.02. The Nasdaq Composite Index <.IXIC> gained 37.51 points, or 2.24 percent, to 1,711.32.

The market's advance had the S&P 500 bumping up against significant resistance around the 875 level, a key technical point the S&P has tried but failed to break in recent days.

A sustained move above that level could lead to even more gains, according to some analysts.

The Nasdaq, up 8.5 percent for the year, is at its highest level since early November.

Shares of tech bellwethers also rose, with Microsoft up 2.2 percent at $20.37 and Apple Inc up 1.1 percent at $125.25.

Energy shares gave another boost to stocks as the price of crude rose back above $50 a barrel following a much larger- than-expected decline in gasoline supplies. Energy behemoths Exxon Mobil and Chevron climbed, with Exxon up 2.1 percent at $68.48 and Chevron up 2.2 percent at $67.41.

As the market awaits the results of the government's stress tests on the health of major U.S. banks, some traders say a more concrete sense of where banks' strengths and weaknesses are make investment decisions easier. The KBW bank index <.BKX> rose 3.5 percent, led by JPMorgan Chase & Co , up 3.3 percent at $33.86.

A statement from the U.S. Federal Reserve on monetary policy and the state of the economy is due at about 2:15 p.m. (1815 GMT). Investors are hopeful that the Fed's statement will acknowledge signs that the recession is abating.

Analysts said worries about the economic impact of the spread of swine flu were easing, even as a baby in Texas who died of the new flu strain was the first confirmed death outside Mexico. A Houston health official said the 23-month-old was Mexican and was in the United States for medical treatment.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)