 Eventually, after the death of Liu Wuzhou and Song Jingang, Yuchi Gong surrendered to Li Shimin and became a major general fighting for Tang Dynasty.In the battle of Luo Yang, when Li Shimin was attacked by Shan Xiongxin, it was Yuchi Gong who saved Li Shimin.And when Li Shimin was framed by his brothers Li Jiancheng and Li Yuanji, Yuchi Gong played a big part in proving Li Shimin's innocence.