Stocks extended gains on Wednesday on better-than-expected earnings and data that suggested business inventories will need rebuilding, even as the economy shrank more than expected in the first quarter.

* Q1 GDP data shows economy shrank more than expected

* Time Warner profit beats expectations

* The Dow Jones industrial average <.DJI> added 135.64 points, or 1.69 percent, to 8,152.59. The Standard & Poor's 500 Index <.SPX> gained 15.51 points, or 1.81 percent, to 870.67. The Nasdaq Composite Index <.IXIC> rose 32.32 points, or 1.93 percent, to 1,706.13.

(Reporting by Rodrigo Campos; editing by Jeffrey Benkoe)