LGTM. One comment: I also wonder if other comparisons could be folded. I think for example about FCMP_UGT/FCMP_UGE which are always true? http://reviews.llvm.org/D6323 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/