Thanks for review. I have tested it for test cases with if(..) and saw that select instruction I introduced is getting combined with select instruction from if statement and resulted code had less instructions. I agree with you point and will update patch accordingly. http://reviews.llvm.org/D3678