Need to fix while loop phi insertion, and then need to create basic block merges