[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:44:36 PST 2019


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


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4457
+    if (isRunOfOnes64(Imm64, MB, ME)) {
+      if (MB >= 32 && MB <= ME) {
+        //                MB  ME
----------------
steven.zhang wrote:
> shchenz wrote:
> > for ` and reg, 0xffffffffffff00ffULL`, it should be replaced by one single rlwinm instruction, seems it is not handled here?
> Good point. I will add it together.
Hmm, after double check, we cannot do it with single rlwinm instructions as it is a wrapping, and the content [0, 31] has been filled with the content of [32, 63].  We need another instructions to clear it. That is the case of 'else' clause.


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

https://reviews.llvm.org/D71829





More information about the llvm-commits mailing list