You're confusing translation and interpretation. A compiler is merely translating your code into a lower-level form. (There is a degree of heuristic-based interpretation that goes into generating good code, but the code's observable behavior is not allowed to change.)

But an LLM has to interpret your words and make judgment calls about the logical details, which is a very different thing. An LLM sufficiently intelligent to make acceptable judgment calls in all situations (acceptable enough to ship to production without human review of those details) would likely be indistinguishable from AGI.