[llvm-bugs] [Bug 49768] opt -slsr crashing with "../lib/Analysis/ScalarEvolution.cpp:5678: llvm::ConstantRange llvm::ScalarEvolution::getRangeForUnknownRecurrence(const llvm::SCEVUnknown *): Assertion `L->getHeader() == P->getParent()' failed."

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 31 10:40:47 PDT 2021


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

listmail at philipreames.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from listmail at philipreames.com ---
Should be fixed by:

commit ae7b1e8823a51068cfa64875fc5222e5b1d16760 (HEAD -> main)
Author: Philip Reames <listmail at philipreames.com>
Date:   Wed Mar 31 10:29:21 2021 -0700

    [SCEV] Handle unreachable binop when matching shift recurrence

    This fixes an issue introduced with my change d4648e, and reported in
pr49768.

    The root problem is that dominance collapses in unreachable code, and that
LoopInfo explicitly only models reachable code.  Since the recurrence matcher
doesn't filter by reachability (and can't easily because not all consumers have
domtree), we need to bailout before assuming that finding a recurrence implies
we found a loop.


Thanks for finding this, and in particular, the nicely reduced reproducer. 
That really helped.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210331/1a024dd0/attachment-0001.html>


More information about the llvm-bugs mailing list