[PATCH] D159464: [InstCombine] Fold comparison of adding two zero extended booleans

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 04:21:29 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/icmp-add.ll:36
+}
+
 define i1 @test1(i32 %a) {
----------------
elhewaty wrote:
> arsenm wrote:
> > elhewaty wrote:
> > > arsenm wrote:
> > > > Add tests showing the multiple use rejections
> > > Can you please explain what do you mean by multiple use rejections? 
> > You check (m_OneUse, so should have some negative tests where there is an additional use (e.g a store of the intermediate value). Similarly you don’t have negative tests for other compare types. You could handle ne/lt/ge but should at least have tests for them even if left unhandled 
> Okay, I will do my best.
> But I am just waiting for the code to be fully accepted, then I will try to write tests.
This is backwards. It’s easier to review a patch that has full tests preconmitted so the patch diff shows the effects 


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

https://reviews.llvm.org/D159464



More information about the llvm-commits mailing list