Skip to content

[LV] must have a resume value for the canonical IV #148390

Open
@sjoerdmeijer

Description

@sjoerdmeijer

Compiling this:

#include <algorithm>
extern char a;
unsigned short e;
long b;
short *c, *d;
void fn1(short f[][3], int g[][3], short h[][3]) {
  for (int i; i < 3ULL; i += 5ULL)
    for (int k; c[i]; k += 2)
#pragma clang loop vectorize_predicate(enable)
      for (int j(((4 ? c[2] : 0) || d[i]) - 1); j < -108 - 18446744073709551485;
           j += 3) {
        a = 0 != f[1][j];
        b = g[1][k] = std::min(e, (unsigned short)h[2][k]);
      }
}

with -Ofast -mcpu=grace -std=c++11 results in:

clang++: llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9759: void preparePlanForEpilogueVectorLoop(VPlan &, Loop *, const SCEV2ValueTy &, const EpilogueLoopVectorizationInfo &): Assertion `EPResumeVal && "must have a resume value for the canonical IV"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]vectorizers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions