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

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 05:48:14 PDT 2018


inouehrs marked an inline comment as done.
inouehrs added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1460
+            if (&BG != &BG2 && BG.V == BG2.V &&
+                (BG2.RLAmt == 0 || BG2.RLAmt == 32))
+              return true;
----------------
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.



https://reviews.llvm.org/D47867





More information about the llvm-commits mailing list