Nothing. Sorting by hp shows the current level of a pokemon's hps, so if you have a fainted one, it will appear at the bottom (or top, not sure.) Contrary to what it seems, it is NOT the total hps a pokemon has. Because of this, it will be the same as sorting them by cp, if all of your pokemon are fully healed.
GamePress
Sorting you Pokémon list
What's the difference between combat power and hp when sorting? The order is the same for me. At least for my first 50 that I checked