[PATCH] D71693: [NFC][PowerPC] Add a function tryAndWithMask

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 19:09:45 PST 2019


shchenz accepted this revision.
shchenz added a comment.
This revision is now accepted and ready to land.

LGTM. Some minor comment, you can handle it as you like.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:207
     bool tryIntCompareInGPR(SDNode *N);
+    bool tryAndWithMask(SDNode *N);
 
----------------
Maybe tryAndWithImmMask?


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4677
 
     // If this is an and of a value rotated between 0 and 31 bits and then and'd
     // with a mask, emit rlwinm
----------------
steven.zhang wrote:
> shchenz wrote:
> > Is there any reason lines 4678 ~ 4686 are left out from `tryAndWithMask()`?
> It is rotate and mask, not and mask. 
I guess here we want to handle special case for And with a Imm mask, so if we change name tryAndWithMask() to tryAndWithImmMask, maybe we can also put these lines to that function also. What do you think? I am also ok to leave it as now.


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

https://reviews.llvm.org/D71693





More information about the llvm-commits mailing list