[PATCH] D133449: [InstCombine] Baseline tests for folding x + (x | -x) to x & (x - 1)

Marc Auberer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 15:58:43 PDT 2022


marcauberer marked an inline comment as done.
marcauberer added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/add_or_sub.ll:92
+
+define i19 @add_or_sub_comb_i19_multiuse(i19 %p) {
+; CHECK-LABEL: @add_or_sub_comb_i19_multiuse(
----------------
spatel wrote:
> This looks good, but there should be 3 of these multi-use tests:
> 1. Extra use of the sub only.
> 2. Extra use of the or only.
> 3. Extra use of both sub and or (that's what we have currently).
> 
> The general rule for instcombine transforms is that we don't want to end up with more instructions than we started with, so it can get a bit tricky, but we'll sort that out in the code patch.
Done 👍


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133449



More information about the llvm-commits mailing list