spatel added a comment. > %2 = add %1, #const > br_cc cond %2, #const > --> > br_cc cond %1, 0 I don't think this transform is safe unless you have 'nsw' or 'nuw' on the add. https://reviews.llvm.org/D24327