-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]regressionvectorizers
Description
When I compiled the code with -O2 flag, it crashed:
#include <stdint.h>
static uint8_t b = 188;
void c();
long d(int e, int p2, short j) {
long f = 0, a = 1;
unsigned long g;
int h;
if (e < 0 || j < 0)
return 1;
h = 0;
for (; h < p2; h++) {
a *= j + 1;
g = e * a;
f += g % (j + 1);
}
if (f < 0)
return 0;
return f;
}
void i();
int64_t k() {
uint32_t l[][8][10] = {0, 4, 7, 1, 4, 3446557846};
int64_t m[10];
int h;
for (h = 0; c + h < 10; h++)
m[(int)d(5, l[0][0][5] - 3446557842, b - 187) + h] = 1;
i(m);
uint8_t *n = &b;
uint8_t **o;
o[0] = &n;
}The crash is:
clang: /root/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7401: llvm::VectorizationFactor llvm::LoopVectorizationPlanner::computeBestVF(): Assertion `(BestFactor.Width == LegacyVF.Width || planContainsAdditionalSimplifications(getPlanFor(BestFactor.Width), CostCtx, OrigLoop)) && " VPlan cost model and legacy cost model disagreed"' failed.
Details can be found here: https://godbolt.org/z/hqP8vMG7b
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]regressionvectorizers
Type
Projects
Status
Done