Salesforce shares surged 46% in the third quarter, leading a broad software rally as investors reversed course on fears that artificial intelligence would cannibalize traditional cloud computing businesses.

The gains came even as the major stock averages posted only modest increases for the quarter ending Wednesday, according to CNBC. The divergence shows money rotating aggressively into software names that had been beaten down earlier in the year over AI disruption concerns.

Microsoft climbed 37% during the same period. Workday and Veeva Systems posted even larger gains, rising 55% and 60% respectively, as the narrative shifted from AI as threat to AI as growth catalyst.

The quarter's performance marks a sharp reversal from earlier in 2024, when enterprise software companies faced selloffs on worries that generative AI tools could make their subscription-based products obsolete. Salesforce, which sells customer relationship management software, had been among the hardest hit before the rebound.

Cybersecurity stocks also outperformed, continuing a stretch of strength as corporate spending on digital defense remains elevated following high-profile breaches across multiple industries.

Not every technology sector participated in the rally. Corning dropped nearly 40% after a substantial run-up, a decline that CNBC's Jim Cramer characterized as a pullback rather than a fundamental deterioration. The glass and optical fiber maker had benefited from data center buildout demand before cooling off.

The rotation into software reflects a broader reassessment of how AI spending will flow through the technology sector. Companies that integrate AI features into existing enterprise products — rather than those building the underlying infrastructure — captured investor attention this quarter.

Salesforce has been embedding AI capabilities into its platform through its Einstein and Agentforce products, positioning the technology as an add-on that increases customer value rather than a replacement for human workflows. That messaging appears to have resonated with shareholders who initially feared the opposite.

Microsoft's gains extend its position as one of the largest companies by market capitalization, with its Azure cloud platform and Copilot AI assistant driving both revenue growth and investor enthusiasm. The company reported strong cloud demand in recent earnings.

Workday, which sells human resources and financial management software, and Veeva, which focuses on life sciences applications, posted the quarter's largest gains among major software names. Both companies serve specialized enterprise markets where switching costs remain high and AI integration offers incremental improvement rather than wholesale disruption.

The technology-heavy Nasdaq Composite's modest overall gain masked these dramatic individual moves, a pattern that has repeated throughout 2024 as investors pick winners and losers within sectors rather than buying broad indexes.