[PATCH] D149699: [InstCombine][DAGCombiner] Improve bswap optimization

Austin Chang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 13:19:14 PDT 2023


austin880625 added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6032
+    // e.g. bswap(logic_op(bswap(x), bswap(y)))
+    //  --> bswap(bswap(logic_op(x, y)))
     if (match(Op0, m_BSwap(m_Value(X))))
----------------
nikic wrote:
> I don't think we need this comment... This is not the kind of optimization that needs extra justification in the code.
I just see some discussions where this optimization was mentioned, so thought about this comment might help whoever run into it
https://github.com/dotnet/runtime/issues/66249
https://reviews.llvm.org/D6407#change-hPSGuibm8ixX

If this is still not needed, I'll remove it together in the next version of the patch


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

https://reviews.llvm.org/D149699



More information about the llvm-commits mailing list