-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]vectorizers
Description
The compiler crashed with -O2 in this code:
#include<stdint.h>
static uint8_t b[][1] = {127};
long a(int c, int e) {
long d;
for (; c <= e; c++)
if (c % 2 == 0)
;
else
d *= c;
return d;
}
int64_t f();
int16_t g() {
int32_t h = 1653000360;
f(a(h - 1653000360, b[0][0] - 126));
uint8_t *i[] = {b, b};
}
The crash is:
clang: /root/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7369: 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.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
The details can be found here: https://godbolt.org/z/eeWW6raPb
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]vectorizers