The S&P 500 rose about 0.8% and the Nasdaq 100 gained 1.7% on Tuesday, with the Dow Jones index adding 0.2%, according to Yahoo Finance. The Russell 2000 small-cap index inched 0.5% higher. Semiconductor ETFs rose between 4% and 5%, with Nvidia, Micron, Broadcom and Advanced Micro Devices leading gains.

Trump said Huang's remarks to lawmakers about his links to an alleged Chinese spy seemed "very truthful" and said Congress should let the chief executive refocus on running his company. Traders are still bracing for larger price swings ahead of Huang's scheduled appearance before the Senate Banking Committee on Thursday.

Separately, U.S. job openings rose in October to their highest level in more than two years while layoffs fell, pointing to a stronger job market. Bret Kenwell of eToro said inflation, rather than labor strength, is pushing the Fed toward higher rates. Investors now await key employment numbers due Friday.

Among individual stocks, Advanced Micro Devices rallied after Waymo partnered with the chipmaker to supply processors for its autonomous driving system. Cerebras Systems gave back part of an early rally after Amazon introduced a new AI chip, and Palantir announced a five-year AI partnership with Italian drug-ingredient manufacturer FIS.