[PATCH] D91877: [RISCV] Combine GREVI sequences

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 10:09:15 PST 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1337
+    uint64_t TZ = countTrailingZeros(ShAmt1);
+    if (ShAmt2 != (ShAmt2 & maskTrailingOnes<uint64_t>(TZ)))
+      break;
----------------
craig.topper wrote:
> Does the order matter? Or do we just need (ShAmt1 & ShAmt2) == 0 to hold?
Maybe we don't even need (ShAmt1 & ShAmt2) == 0  if we XOR the constants. Maybe folding 0 to GREVSrc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91877



More information about the llvm-commits mailing list