[PATCH] D143373: [InstCombine] fold icmp of the sum of ext bool based on limited range
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 07:26:47 PST 2023
spatel added a comment.
In D143373#4121737 <https://reviews.llvm.org/D143373#4121737>, @bcl5980 wrote:
> remove the condition CmpC->abs().ule(1)
Without that condition, we can't use getSextValue() safely on the compare constant. This test needs to be added (please pre-commit the new tests too) because it will now crash:
define i1 @zext_sext_add_icmp_sgt_minus2(i1 %a, i1 %b) {
%zext.a = zext i1 %a to i128
%sext.b = sext i1 %b to i128
%add = add i128 %zext.a, %sext.b
%r = icmp sgt i128 %add, 9223372036854775808
ret i1 %r
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143373/new/
https://reviews.llvm.org/D143373
More information about the llvm-commits
mailing list