Commit 5e589ea4 authored by Eli Friedman's avatar Eli Friedman
Browse files

[ScopInfo] Fix crash with sum of invariant load and AddRec.

r303971 added an assertion that SCEV addition involving an AddRec
and a SCEVUnknown must involve a dominance relation: either the
SCEVUnknown value dominates the AddRec's loop, or the AddRec's
loop header dominates the SCEVUnknown. This is generally fine
for most usage of SCEV because it isn't possible to write an
expression in IR which would violate it, but it's a bit inconvenient
here for polly.

To solve the issue, just avoid creating a SCEV expression which
triggers the asssertion.

I'm not really happy with this solution, but I don't have any better
ideas.

Fixes https://bugs.llvm.org/show_bug.cgi?id=33464.

Differential Revision: https://reviews.llvm.org/D34259

llvm-svn: 305864
parent cd227536
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment