The U.S. stock market inched to more records Tuesday as winners of the artificial-intelligence boom kept driving higher.