Skip to content

[bug] AffineApplyNormalizer assert Error #421

@sBobHuang

Description

@sBobHuang

When running my code using cgeist with the --raise-scf-to-affine option, I encountered the following error:

cgeist: ../lib/polygeist/Passes/AffineCFG.cpp:534: AffineApplyNormalizer::AffineApplyNormalizer(mlir::AffineMap, llvm::ArrayRefmlir::Value, mlir::PatternRewriter&, mlir::DominanceInfo&): Assertion `isValidSymbolInt(t, false)' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.

Use the following minimal code example (saved as test.c) that reproduces the error,run the code using cgeist test.c --raise-scf-to-affine --function=* -S --memref-fullrank -o test.mlir

void nested_loop_using_variable_as_step(int vali[20][30]) {
  int stepx = vali[0][0];
  for (int x = 0; x < 20; x++) {
    for (int y = 1; y < 30; y += stepx) {
      vali[x][y] = 1;
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions