[PATCH] D150360: [InstCombine] Optimize compares with multiple selects as operands

Tejas Joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 00:46:11 PDT 2023


tejas marked 4 inline comments as done.
tejas added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/icmp-with-selects.ll:77
+}
+
----------------
nikic wrote:
> Add negative tests:
> 1. Select conditions are not the same.
> 2. Neither side simplifies.
> 
> Also add multi-use tests, where one/both selects have additional uses. You'll find that you need to add some one-use checks.
Added the negative tests. I had not added one-use checks since we are not explicitly removing the selects nor modifying them, but they do bloat up the code, so added now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150360



More information about the llvm-commits mailing list