S&P 500 notches record-high close; GM slumps as tariffs bite