Skip to content

[LLVM][RISCV][ICE] LoopVectorize Assertion Failure in computeBestVF() #169948

@whileone-sk

Description

@whileone-sk

llvm::LoopVectorizationPlanner::computeBestVF(): Assertion `(BestFactor.Width == LegacyVF.Width || BestPlan.hasEarlyExit() || !Legal->getLAI()->getSymbolicStrides().empty() || planContainsAdditionalSimplifications(getPlanFor(BestFactor.Width), CostCtx, OrigLoop, BestFactor.Width) || planContainsAdditionalSimplifications( getPlanFor(LegacyVF.Width), CostCtx, OrigLoop, LegacyVF.Width)) && " VPlan cost model and legacy cost model disagreed"' failed.

RUN script red-e0c444.sh to reproduce the issue.
red-e0c444.sh
red-e0c444.c

Attached backtrace.
verbose-log.txt

Reduced testcase.
red.c

Found via Fuzzer.

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