[PATCH] D71829: [PowerPC] Exploit the rlwinm instructions for "and" with constant.

qshanz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 25 21:51:40 PST 2019


steven.zhang marked an inline comment as done.
steven.zhang added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4456
+    // using "and" instruction. Try to exploit it with rotate mask instructions.
+    if (isRunOfOnes64(Imm64, MB, ME)) {
+      if (MB >= 32 && MB <= ME) {
----------------
shchenz wrote:
> Seems if you only consider MB>=32  && MB<=ME case, i think current isRunOfOnes for type i32 should match your requirement? Before call isRunOfOnes() check whether Imm64 can be represented by i32?
We need the isRunOfOnes64 as we will do the special handling for all the cases that is RunOfOne64 with two instructions.


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

https://reviews.llvm.org/D71829





More information about the llvm-commits mailing list