[PATCH] D34259: [polly] [ScopInfo] Fix crash with sum of invariant load and AddRec.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 16:12:32 PDT 2017


efriedma created this revision.
Herald added a reviewer: bollu.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D34259

Files:
  lib/Analysis/ScopInfo.cpp
  test/ScopInfo/invariant_load_addrec_sum.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34259.102742.patch
Type: text/x-patch
Size: 4334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170615/bab234a7/attachment.bin>


More information about the llvm-commits mailing list