"The market continues its retesting of recent highs with Proctor & Gamble and GM numbers leading the way -- things are weak, but it's an expectations game; corporate earnings are sluggish, but people are buying stocks on the belief the worst is over," said Peter Boockvar, equity strategist at Miller Tabak.
"That's what bear-market rallies are all about, hopes and wishes the worst is over," said Boockvar, who does not himself subscribe to the view.
The Dow Jones Industrial Average rose 118.87 points to 12,950.81, with all but five of its 30 components trading higher.
The blue-chip advance was led by GM , recently up 13.7% after the automaker reported a first-quarter net loss of $3.25 billion, or $5.74 a share, compared with net income of $62 million a year earlier. Its adjusted loss of 62 cents a share, however, was well ahead of the $1.60-a-share loss analysts were expecting.
Also bolstering the Dow, shares of Proctor & Gamble climbed 3.2% after the consumer-products giant reported earnings that topped forecasts.
Citigroup Inc. led blue-chip declines, its stock off 2.6%.
The S&P 500 gained 6.81 points to 1,397.75, while the Nasdaq Composite climbed 15.5 points to 2,441.6.
Telecommunication services led S&P sector gains, recently up 1.2%, followed by industrials, which was ahead 0.7%. S&P sector declines were fronted by energy, off 0.7%, and materials, down 0.5%.
Volume on the New York Stock Exchange topped 2.1 billion, while 1 billion shares were traded on the Nasdaq, with advancing stocks ahead of those declining by roughly 2 to 1 on the NYSE and 8 to 5 on the Nasdaq.
On the New York Mercantile Exchange, crude-oil futures reversed course after making early gains, with the contract for June delivery off $1.11 at $114.52 a barrel in a carryover of Tuesday's retreat.
In play as well were expectations of another Federal Reserve interest-rate cut of a quarter of a percentage point, to 2%. The central bank is slated to release its decision at 2:15 p.m. Eastern.
"The market is pricing in an 80% chance that the Fed cuts rates 0.25%. The dollar is likely to continue strengthening if the Fed signals an end to rate cuts after an expected reduction today. Many believe this will also cause commodity prices to fall," said James Hyland, an analyst with Wachovia Corp.
But Art Hogan, chief market strategist at Jefferies & Co., believes there is "a credible possibility that the Fed could stand pat" and leave rates unchanged, saying stronger-than-expected U.S. economic growth in the first quarter offered cover for such a move.
"The most important thing will probably be they signal a pause - we have a need for them to show us a readiness to right inflation," said Hogan.
Ahead of the opening bell, data showed the U.S. economy grew at an annual rate of 0.6% in the first three months of the year, topping the 0.2% growth expected by economists.
Also, companies in the U.S. private sector added 10,000 jobs in April, according to the ADP employment report. Economists had expected ADP to drop by 55,000 in April.
Japan's Nikkei 225 Average closed 0.3% lower overnight. The Bank of Japan left its key interest rate on hold, as expected.
As for European markets, bourses were higher ahead of the Fed's rate decision, with the German DAX 30 index up 0.6%.
U.S. stocks ended mostly lower on Tuesday, though the technology sector was lifted by upbeat earnings from Corning. While the Dow Jones Industrial Average ended down 39 points, the technology-focused Nasdaq Composite rose 1.7 points.
By Kate Gibson