By Noel Randewich and Ragini Mathur

Wall Street climbed on Monday, with Broadcom and other chip stocks rallying as investors bought shares in companies related to artificial intelligence that are expected to drive a strong second-quarter earnings season.

Broadcom NASDAQ:AVGO jumped 3.8% after the chipmaker and Apple NASDAQ:AAPL agreed to extend a deal through 2031 to develop and supply a range of custom chips.

The S&P 500 information technology sector index SP:S5INFT jumped 1.5%, while the Philadelphia SE Semiconductor index NASDAQ:SOX added 2.6%, recovering after two straight sessions of losses.

"This is a market that's leaving a lot of people out. If you're not in certain tech names, if you're not in semiconductors, then you're basically missing the entire rally," said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma. "I think it's a very tenuous rally. There is a risk, particularly if the Fed continues to see higher interest rates for longer."

Taking advantage of massive investor demand for AI-related chip stocks, South Korea's SK Hynix KRX:000660 is set to debut on the Nasdaq later this week.

Microsoft shares fell 1.2% after the tech heavyweight said it was cutting about 2.1% of its workforce, or roughly 4,800 jobs.

"What the market is saying is Microsoft can't afford all of its CapEx and there's not a clear return on invested capital yet. Therefore, laying off people in lieu of moderating CapEx spend is perceived as a negative," said Thomas Hayes, chairman at Great Hill Capital LLC.

SpaceX NASDAQ:SPCX dipped 1.3%. Elon Musk's rocket and AI giant is set to join the tech-heavy Nasdaq 100 on Tuesday.

In economic data, the Institute for Supply Management said its non-manufacturing purchasing managers index edged down to 54.0 last month, matching expectations.

The S&P 500 was up 0.60% at 7,528.47 points and the Nasdaq gained 0.96% to 26,081.19 points.

The Dow Jones Industrial Average was unchanged at 52,899.61 points, retreating after hitting a record high earlier in the session.

Despite the S&P 500's gain, declining stocks in the index outnumbered rising ones (.AD.SPX) by a 1.3-to-one ratio.

The three major indexes each rose about 2% last week, while semiconductor shares remained volatile after driving much of this year's market rally.

Markets have taken recent strength in healthcare, industrials and financials as a sign the rally may be broadening beyond the chip and AI trade.

With major U.S. companies set to begin reporting quarterly earnings in the next few days, investors have high expectations.

Analysts expect S&P 500 companies to increase their earnings by an aggregate 24% year-over-year in the second quarter, according to LSEG I/B/E/S. Tech sector earnings are projected to jump around 65%.

Delta Air Lines NYSE:DAL and PepsiCo NASDAQ:PEP are set to report results later in the week.

Following a cooler-than-expected jobs report last week, traders see a 25% chance of a 25-basis-point rate hike at the central bank's July 29 meeting, according to CME's FedWatch tool.

Hawkish bets had risen after last month's Fed meeting, the first under new Chair Kevin Warsh. The minutes are due on Wednesday.

Fed Governor Christopher Waller said on Monday that forward guidance can be a "valuable tool" that speeds up the impact of monetary policy under the right circumstances, but can become problematic when used inflexibly.

Shares of O'Reilly Automotive NASDAQ:ORLY tumbled 6.7%. Bloomberg News reported on Thursday that the auto parts retailer sent a cash offer to buy Genuine Parts NYSE:GPC. Genuine Parts fell 3.2%.