[PATCH] D73079: [LV] Fix predication for branches with matching true and false succs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 11:19:14 PST 2020
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6732
if (!BI->isConditional())
return EdgeMaskCache[Edge] = SrcMask;
----------------
Ayal wrote:
> ```
> 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.
> if (!BI->isConditional() || BI->getSuccessor(0) == BI->getSuccessor(1))
> return EdgeMaskCache[Edge] = SrcMask;
> ?
Yes that is even simpler! I wasn't aware that we already support potentially null masks elsewhere.
>
> Best be cleaned up before LV, as it may misguide cost, but when both successors are the same the branch is essentially unconditional.
Agreed and I don't think such branches would ever hit this point in a real-world pipeline.
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