[PATCH] D88834: [InstCombine] matchRotate - add support for matching general funnel shifts with constant shift amounts (PR46896)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 12:04:30 PDT 2020


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2080
 
   // First, find an or'd pair of opposite shifts with the same shifted operand:
+  // or (lshr ShVal0, ShAmt0), (shl ShVal1, ShAmt1)
----------------
Remove "with the same shifted operand".


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2107-2108
 
+    // For non-constant cases, the following patterns currently only support
+    // rotation patterns.
+    if (ShVal0 != ShVal1)
----------------
Sorry - it's still not clear to me *why* we have this clause. Are we regressing something without this restriction, or is the expanded IR pattern with a variable shift amount different between general funnel vs. rotate?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88834



More information about the llvm-commits mailing list