[llvm-bugs] [Bug 43784] New: [LoopDataPrefetch] Assertion `L->getLoopPreheader() && "Can't expand add recurrences without a loop preheader!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 24 05:31:55 PDT 2019


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

            Bug ID: 43784
           Summary: [LoopDataPrefetch]  Assertion `L->getLoopPreheader()
                    && "Can't expand add recurrences without a loop
                    preheader!"' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22713
  --> https://bugs.llvm.org/attachment.cgi?id=22713&action=edit
reduced testcase

I tried to compile the calculix benchmark with -min-prefetch-stride=1 and ran
into an assertion:

llc -O3 -mcpu=z14 ./tc_prefstride1.ll -o - -min-prefetch-stride=1

ScalarEvolutionExpander.cpp:1264: llvm::PHINode*
llvm::SCEVExpander::getAddRecExprPHILiterally(const llvm::SCEVAddRecExpr*
, const llvm::Loop*, llvm::Type*, llvm::Type*, llvm::Type*&, bool&): Assertion
`L->getLoopPreheader() && "Can't expand add recurrences without a loop
preheader!"' failed.

...
#24 0x000000000261e346 llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*,
llvm::Type*)
#25 0x0000000002e4d5be (anonymous namespace)::LoopDataPrefetch::run()
...


It seems there currently is no check for isLoopSimplifyForm() or even if the
loop has a preheader in LoopDataPrefetch, and I wonder why that is...

-- 
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/20191024/16f84167/attachment.html>


More information about the llvm-bugs mailing list