* S&P 500 gains after falling below 200-day moving average
* China slowdown fears drag commodities towards 2015 lows
* U.S. oil prices reverse losses
* AMD revenue warning weighs on semiconductor companies
* Indexes: Dow up 0.41 pct, S&P up 0.51 pct, Nasdaq down 0.04 pct (Updates with market gains, comment, updates prices)
By Noel Randewich
July 7 (Reuters) - U.S. stocks reversed early losses and moved higher in choppy trade on Tuesday, as a rebound in U.S. oil prices offset concerns of a slowdown in China and the Greek debt crisis.
The S&P energy index reversed course to trade up 1.13 percent as U.S. crude rose 0.7 percent after trading as much as 3.7 percent lower earlier in the day.
Oil markets have been keeping a close eye on negotiations between Iran and six major powers over a nuclear deal. A source close to the talks said on Tuesday that the negoations cannot continue indefinitely and there must be an agreement soon if there is to be an accord to end sanctions in exchange for curbs on Tehran’s atomic program.
“The decline in oil ended. Now oil’s up on the day. Energy stocks bounced, and when that happened it helped the indices move higher,” said Stephen Massocca, Chief Investment Officer at Wedbush Equity Management LLC in San Francisco.
Concerns about China’s economy and its sliding stock market has weighed recently on an already ravaged global commodity sector, with prices of copper, coal, natural gas and iron ore falling towards their 2015 lows.
Euro zone leaders were holding an emergency meeting in Brussels on Tuesday and could hold another summit on Sunday to approve a plan to aid Greece if creditor institutions are satisfied with a Greek loan application and reform plan, two senior EU sources said.
A warning from Chipmaker Advanced Micro Devices about weak demand for personal computers pushed its shares 15 percent lower and hurt peers like Nvidia and Intel .
At 3:42 PM the Dow Jones industrial average rose 72.22 points, or 0.41 percent, to 17,755.8. The S&P 500 gained 10.51 points, or 0.51 percent, to 2,079.27 after briefly falling below its 200-day moving average. Nasdaq Composite dropped 2.00 points, or 0.04 percent, to 4,989.94.
Seven of the 10 major S&P 500 sectors were higher. The utilities index jumped 2.47 percent.
Advancing issues outnumbered declining ones on the NYSE by 1,755 to 1,327, for a 1.32-to-1 ratio on the upside; on the Nasdaq, 1,659 issues fell and 1,109 advanced for a 1.50-to-1 ratio favoring decliners.
The benchmark S&P 500 index was posting 14 new 52-week highs and 48 new lows; the Nasdaq Composite was recording 42 new highs and 163 new lows. (Additional reporting by Tany Agrawal; Editing by Meredith Mazzilli and Chizu Nomiyama)