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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 12:08:33 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:
> > 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 


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

https://reviews.llvm.org/D159464



More information about the llvm-commits mailing list