[PATCH] D149577: [InstCombine] Improve bswap optimization

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 11:11:14 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1632
+    // --> bswap(bswap(logic_op(x, y)))
+    if (Value * V; match(IIOperand, m_BSwap(m_Value(V)))) {
+      return replaceInstUsesWith(CI, V);
----------------
nit, but since we already have the scope for `::bswap` case, can you just declare `V` before the match.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149577



More information about the llvm-commits mailing list