[PATCH] D150086: [GlobalISel] Implement commuting shl (add/or x, c1), c2 -> add/or (shl x, c2), c1 << c2

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 10:24:15 PDT 2023


paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1647
+
+  if (!getTargetLowering().isDesirableToCommuteWithShift(MI, !isPreLegalize()))
+    return false;
----------------
should this go before the calls to `mi_match`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150086



More information about the llvm-commits mailing list