[PATCH] D73079: [LV] Fix predication for branches with matching true and false succs.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 10:05:14 PST 2020


Ayal added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6732
 
   if (!BI->isConditional())
     return EdgeMaskCache[Edge] = SrcMask;
----------------
```
if (!BI->isConditional() || BI->getSuccessor(0) == BI->getSuccessor(1))
  return EdgeMaskCache[Edge] = SrcMask;

```
?

Best be cleaned up before LV, as it may misguide cost, but when both successors are the same the branch is essentially unconditional.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73079





More information about the llvm-commits mailing list