[PATCH] D82444: [SLP] Make sure instructions are ordered when computing spill cost.
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 06:06:04 PDT 2020
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3777
+ llvm::stable_sort(OrderedScalars, [this](Instruction *A, Instruction *B) {
+ return !DT->dominates(A, B);
+ });
----------------
vdmitrie wrote:
> There is a problem with this predicate function.
> MSFT STL implementation of stable_sort asserts that if predicate returned true
> then it must return false when operands are swapped.
> But (A dom B) == false does not necessarily mean that (B dom A) == true.
> Instead: (A dom B) ==true means that (B dom A) == false.
> Rewriting it like this solves this issue:
> return DT->dominates(B, A);
@fhahn try to fix it and reland.
Seems like this is a reason why a win buildbot failed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82444/new/
https://reviews.llvm.org/D82444
More information about the llvm-commits
mailing list