This is the litmus test of the rally, says Cramer

Cramer's Mad Dash: Watch SWKS
Cramer's Mad Dash: Watch SWKS   

A big indicator of the stock market's direction on Tuesday will be whether Skyworks Solutions can hold onto its gains, CNBC's Jim Cramer said Tuesday.

"If this stock gives up the gain, we're going down big time today because this is as good a story as you're going to get right now in this marketplace," Cramer said on "Squawk on the Street." "I don't think it should give. I'm just saying this is the litmus test of this rally."

The analog chipmaker raised its quarterly profit and revenue forecast, sending the company's shares sharply higher in midmorning trading.

Skyworks said it now expects a profit of $1.08 per share on revenue of $718 million for its fiscal fourth quarter ended in September—above its forecast of a profit of $1 per share and revenue of $680 million.

Read More Apple's iPhone 6 Plus includes chips from Skyworks—iFixit

Analysts on average were expecting a profit of $1.01 per share on revenue of $679.4 million, according to Thomson Reuters I/B/E/S.

Microchip Technology surprised investors last week with a warning that suggests a further slowing in chip demand worldwide. But Cramer thinks Skyworks isn't likely to disappoint since it enjoys a large market share.

"As hideous as Microchip was, [the Skyworks news] is a thing of beauty," he said.

—Reuters contributed to this report.

DISCLOSURE: When this story was published, Cramer's charitable trust did not own Microchip or Skyworks.