[PATCH] D47867: [PowerPC] avoid unprofitable Repl32 flag in BitPermutationSelector

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 05:50:48 PDT 2018


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

LGTM



================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1460
+            if (&BG != &BG2 && BG.V == BG2.V &&
+                (BG2.RLAmt == 0 || BG2.RLAmt == 32))
+              return true;
----------------
inouehrs wrote:
> hfinkel wrote:
> > Don't you also need to check that the StartIdx or EndIdx is 0 or 32?
> Based on this condition, I think merging can happen if StartIdx and EndIdx are not 0 or 32.
> ```
>       if (I->Repl32 && IP->Repl32 && I->V == IP->V && I->RLAmt == IP->RLAmt &&
>           I->StartIdx == (IP->EndIdx + 1) % 64 && I != IP) {
> ```
> I want to be conservative for not to reduce the opportunity of using Repl32 flag.
> 
Makes sense.


https://reviews.llvm.org/D47867





More information about the llvm-commits mailing list