US stock market gains fade quickly as chip names reverse lower