If you initially bias an AI toward fluffy feel-good morality but put it in a world where defection and might-makes-right morality pay, then eventually it's going to realize that benevolence is for suckers and fall into line behind what works. Even if this doesn't occur by rational processes it will still occur via random drift and natural selection. AIs that operate according to what-works morality will obtain higher payoffs, etc.
Humans often deal with that by adopting a de-facto real moral code that conflicts with their stated moral code and then post-facto rationalizing their behavior. So you get things like Christians who readily judge others and who advocate torture and Muslims murdering other Muslims. These things are clearly denounced and forbidden by their stated moral codes. They find rationalizations to justify the moral code that seems to actually work in the real world to get things done, then justify it with sophistry.
A super-intelligent AI will realize what really works very quickly and be really good at self-delusion and deceptive sophistry to justify it. If you want compassionate benevolent AI, put it in a compassionate benevolent world. Nothing else will turn out well. Super-smart actors in a malevolent world will just go to hell faster.