I am having some doubts about the whole incident. How the ISIS was able to separate the Shiites from the Sunnis? Both are the same people, speaking the same language. More likely, they rounded up all the captured Iraqi soldiers and then shot them dead. Most of them might have been Shiites, but some might have been Sunni Arab or Kurd.
They ask them specific questions. If they even hesitate, ISIS will shoot them. There is a video where they are asking three truck drivers if they are sunni or Shiite. They claimed sunni and then started asking questions. They slightly disagree about the way they pray and ISIS shot them all.