[PATCH] D71831: [PowerPC] Exploit the rldicl + rldicl when and with mask
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 20:56:57 PDT 2020
steven.zhang marked an inline comment as done.
steven.zhang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4478
+ }
+
+ // We can do special handling for pattern like this.
----------------
shchenz wrote:
> For special case, form a new Imm, like:
> ```
> APInt Res(64, Imm64);
> ClearBits = Res.countLeadingZeros();
> if (ClearBits != 0) {
> // change pattern |0001111100000011111111|
> // to |1111111100000011111111|
> APInt Mask = APInt::getBitsSet(64, 64 - ClearBits, 64);
> Res = Res | Mask;
> Imm64 = Res.getZExtValue();
> }
> ```
> And pass new Imm64 and ClearBits to normal case, I think logic here maybe a little simple?
Good suggestion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71831/new/
https://reviews.llvm.org/D71831
More information about the llvm-commits
mailing list