[PATCH] D34242: [InstCombine] canonicalize icmp predicate feeding select

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 18 15:27:38 PDT 2017


spatel added a comment.

In https://reviews.llvm.org/D34242#783298, @davide wrote:

> If the goal of this is to expose more opportunities for congruent expressions maybe GVN itself should do this canonicalization, maybe? Some algorithms perform, e.g., reassociation to catch more cases.
>  See, e.g.
>  http://www.sable.mcgill.ca/~hendren/621/karthikhandouts.pdf


Are you suggesting a change to GVN as an independent improvement or as a substitute for this transform in InstCombine? As I mentioned, I think this patch makes InstCombine behavior more predictable and consistent (because we already have this transform for cmp+br).


https://reviews.llvm.org/D34242





More information about the llvm-commits mailing list