[PATCH] D96661: [RISCV] Move SHFLI matching to DAG combine. Add 32-bit support for RV64

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 09:28:41 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rv32Zbp.ll:2879
   %and1 = and i64 %shl, 4919131752989213764
-  %or = or i64 %and1, %and
+  %or = or i64 %and, %and1
   %shr = lshr i64 %a, 1
----------------
frasercrmck wrote:
> Are these changes in operand order creating cases that weren't previously optimized? I take it it's not now required for the optimization to work.
Tablegen would automatically generate patterns for all permutations of the operands for the two ORs, but we weren't testing it. I changed the tests to make sure my commuting and associativity worked. Each test case should have a different permutation now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96661



More information about the llvm-commits mailing list