[PATCH] D159510: [InstCombine] Optimize 'xor-and-select' sequence to 'or' for bool

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:58:21 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3184
+  }
+
   return nullptr;
----------------
1) You can also do `and` case: https://alive2.llvm.org/ce/z/adHMjn (if the ~ op is the trueval).
2) This probably belongs in `foldSelectOfBools`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159510



More information about the llvm-commits mailing list