[PATCH] D139253: [InstCombine] fold more icmp + select patterns by distributive laws

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 08:10:25 PST 2022


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/select-cmp.ll:212
+; CHECK-NEXT:    [[R_V:%.*]] = select i1 [[C:%.*]], i6 [[Y:%.*]], i6 [[Z:%.*]]
+; CHECK-NEXT:    [[R:%.*]] = icmp uge i6 [[R_V]], [[X:%.*]]
+; CHECK-NEXT:    ret i1 [[R]]
----------------
bcl5980 wrote:
> bcl5980 wrote:
> > spatel wrote:
> > > This is not correct.
> > Ah, Thanks for finding the case.
> Can I ask you how could you find that? Local alive2?
I just noticed that the predicate changed, but the common operand position did not.
I did paste it into Alive2 after that to make sure I saw it correctly. :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139253/new/

https://reviews.llvm.org/D139253



More information about the llvm-commits mailing list