Only that the compiler works in a defined algorithmic way that can always be expected to work, at worst it uses more cpu registers than needed or something. AI on the other hand just spews garbage in a fundamentally statistical way and despite the enormous efforts to create tools that manipulate it into working more predictably, it still sucks so much of the time.
Another difference is that you are critically thinking when "instructing" a compiler via the code, but you only convince yourself that you think critically when you're instructing an AI, it's not the same and it actively makes you a worse engineer every time you decide to use it instead of thinking.