A rebound in equities put the S&P 500 close to its record, a day after the gauge briefly crossed its 6,300 milestone.