[PATCH] D24700: [InstCombine] optimize unsigned icmp of increment
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 12:56:49 PDT 2016
spatel added a comment.
In https://reviews.llvm.org/D24700#547730, @Deewiant wrote:
> We'd be performing incorrect transformations like `icmp sge (X + 1), Y -> icmp sgt X, Y`. So we'd still have to combine specific predicates with specific `match` calls (and non-null `A`/`C` checks) somehow, and at that point I don't think that would really improve readability.
Ah, yes. We should probably have some negative regression tests for those cases. :)
There's code in canonicalizeCmpWithConstant() that does similar matching, so maybe there's still some way to shrink the logic, but it can wait.
https://reviews.llvm.org/D24700
More information about the llvm-commits
mailing list