Matrix Revolutions
The third Matrix film ends in some confusing terms. Neo decides to sacrifice himself so that the robots to use him against Agent Smith. The confusing part is that Agent Smith is supposed to be a part of the machine, so how would that make sense?
Neo the Martyr
It's not necessarily a happy ending. Neo ends up becoming a martyr to create peace between man and machine. He dies and the robot leader is able to use Neo's body to destroy all of the clones.