Issue 60927
Summary [LSR] Assertion failure: No dominance between recurrences used by one SCEV?
Labels regression, llvm:optimizations, crash
Assignees davemgreen
Reporter vzakhari
    The issue affects SPEC CPU2017/521.wrf compiled with Flang.  The assertion started kicking in after https://reviews.llvm.org/D144014

This is llvm-reduce'd reproducer: [reduced.ll.gz](https://github.com/llvm/llvm-project/files/10808264/reduced.ll.gz)

I was not able to reproduce the issue with an `opt` invocation, so here is the `clang` command to reproduce: `clang -cc1 -emit-obj -O2 -x ir reduced.ll`
```
clang: /llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:744: std::optional<int> CompareSCEVComplexity(llvm::EquivalenceClasses<const llvm::SCEV*>&, llvm::EquivalenceClasses<const llvm::Value*>&, const llvm::LoopInfo*, const llvm::SCEV*, const llvm::SCEV*, llvm::DominatorTree&, unsigned int): Assertion `DT.dominates(RHead, LHead) && "No dominance between recurrences used by one SCEV?"' failed.
```

If I revert 7abe3497e72af3ddee789dfc62c63a981a25dbf6 the compilation passes.

@davemgreen can you please take a look?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to