[PATCH] D115750: [SLP]Further improvement of the cost model for scalars used in buildvectors.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 8 09:08:08 PDT 2022
mstorsjo added a comment.
This caused (or exposed?) failing asserts:
$ cat sqrtf.c
float *a;
float c;
float sqrtf(float);
void b() {
float d, e, f, g;
d = c * (0 + 2 * sqrtf(c) * 0);
e = c * (0 - (c + 1) * 0);
f = c * (0 - 2 * sqrtf(c) * 0);
g = 2 * (0 + (c + 1) * 0);
a[0] = d / 0;
a[1] = e / 0;
a[2] = f / 0;
a[3] = g / 0;
}
$ clang -target x86_64-linux-gnu -c -O2 -fno-math-errno sqrtf.c
clang: ../lib/Transforms/Vectorize/SLPVectorizer.cpp:6592: llvm::InstructionCost llvm::slpvectorizer::BoUpSLP::getTreeCost(llvm::ArrayRef<llvm::Value*>): Assertion `Mask[InIdx] == UndefMaskElem && "InsertElementInstruction used already."' failed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115750/new/
https://reviews.llvm.org/D115750
More information about the llvm-commits
mailing list