Nasdaq and S&P 500 hit record highs, powered by technology stocks and a jump in Vertex Pharmaceuticals, while gains on the Dow were capped by a sharp drop in IBM shares.