Even near-perfect LLMs would benefit from the compiler optimizations that types allow.
However perfect LLMs would just replace compilers and programming languages above assembly completely.