U.S. stocks remained little changed on Tuesday, but the S&P 500 managed to make a new record high thanks to strong buying at the end of session.