By Rex Crum, MarketWatch

SAN FRANCISCO (MarketWatch) -- Tech stocks' early gains were slipping away in late trading Tuesday, with Apple Inc. remaining one of the few sector bellwethers still in positive territory following a Wall Street analysts' rating upgrade.

Apple (AAPL) rose 1.2% to $537.23 after Andy Hargreaves of Pacific Crest Securities raised his rating on the company to outperform, or the equivalent of buy, from sector perform and set a price target of $635 a share on Apple's stock. In a research note, Hargreaves based much of his upgrade on prospects for iPhone sales and the next model of the iPhone, which is likely to come out later this year.

Hargreaves said a larger-screen version of the so-called iPhone 6 is "likely to drive estimates higher" for Apple, and could add as much as $4 a share to the company's per-share earnings in its 2015 fiscal year "if 35% of iPhone customers choose a larger iPhone when they upgrade and Apple is able to capture 10% of the large-format Android market."

Facebook (FB) turned back from its early gains to shed 58 cents a share and trade at $71.46. Analyst Ken Sena of Evercore Partners raised his price target on Facebook's stock to $64 a share from $60, mostly due to the enterprise value opportunities from its acquisition of WhatsApp.

Twitter Inc. (TWTR) was up by 39 cents a share at $54.28. The microblogging site was down for about 30 minutes Tuesday due to what was termed a "service issue."

Small gains also came from online retailer Zulily Inc. (ZU), Zynga Inc. IBM Corp. (IBM) and Microsoft Corp. (MSFT)

Fusion-io Inc. (FIO) rose 1.2% to $11.79 a share. Pacific Crest analyst Brent Bracelin said the flash-memory storage technology company is seeing more interest in its products from tech resellers and partners.

The Nasdaq Composite Index (RIXF) fell almost 32 points to 4,302 and the Philadelphia Semiconductor Index (SOX) was also in the red.

More tech news from MarketWatch:

Google's gigabit gambit isn't going away

Is Facebook/WhatsApp deal endangered?

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Fusion-IO, Inc. (NYSE:FIO)
Historical Stock Chart
From Jun 2024 to Jul 2024 Click Here for more Fusion-IO, Inc. Charts.
Fusion-IO, Inc. (NYSE:FIO)
Historical Stock Chart
From Jul 2023 to Jul 2024 Click Here for more Fusion-IO, Inc. Charts.