[llvm-bugs] [Bug 47327] New: opt -loop-unroll seems to do unbounded recursion

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 27 00:23:07 PDT 2020


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

            Bug ID: 47327
           Summary: opt -loop-unroll seems to do unbounded recursion
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 23898
  --> https://bugs.llvm.org/attachment.cgi?id=23898&action=edit
bbi-45693.ll reproducer

Reproduce with
 opt < bbi-45693.ll -loop-unroll -o - -S

Which results in 

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: build-all/bin/opt -loop-unroll -o - -S 
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'Loop Pass Manager' on function '@f'
3.      Running pass 'Unroll loops' on basic block '%for.cond.outer'
build-all/bin/opt[0x47c4c14]
build-all/bin/opt(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x47c279e]
build-all/bin/opt[0x47c4f2c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f5243932890]
build-all/bin/opt(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintE+0x2e)[0x394afee]
build-all/bin/opt[0x393cc3b]
build-all/bin/opt(_ZN4llvm15ScalarEvolution10getAddExprERNS_15SmallVectorImplIPKNS_4SCEVEEENS2_11NoWrapFlagsEj+0x15e)[0x393020e]
build-all/bin/opt(_ZN4llvm15ScalarEvolution24createSimpleAffineAddRecEPNS_7PHINodeEPNS_5ValueES4_+0x27b)[0x39474cb]
build-all/bin/opt(_ZN4llvm15ScalarEvolution19createAddRecFromPHIEPNS_7PHINodeE+0x2f9)[0x3948459]
build-all/bin/opt(_ZN4llvm15ScalarEvolution16createNodeForPHIEPNS_7PHINodeE+0x14)[0x394a524]
build-all/bin/opt(_ZN4llvm15ScalarEvolution10createSCEVEPNS_5ValueE+0x1614)[0x3943254]
build-all/bin/opt(_ZN4llvm15ScalarEvolution7getSCEVEPNS_5ValueE+0x47)[0x393eb67]
build-all/bin/opt(_ZN4llvm15ScalarEvolution10createSCEVEPNS_5ValueE+0x754)[0x3942394]
build-all/bin/opt(_ZN4llvm15ScalarEvolution7getSCEVEPNS_5ValueE+0x47)[0x393eb67]
build-all/bin/opt(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_PNS_5ValueEb+0x13d)[0x39639ed]
build-all/bin/opt(_ZN4llvm15ScalarEvolution24isLoopEntryGuardedByCondEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_+0x42d)[0x3960f5d]
build-all/bin/opt(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x5b3)[0x395b193]
build-all/bin/opt(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopEPNS_8ICmpInstEbbb+0x359)[0x3956f29]
build-all/bin/opt(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x14e)[0x39564ae]
build-all/bin/opt(_ZN4llvm15ScalarEvolution30computeExitLimitFromCondCachedERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0xe7)[0x3955f77]
build-all/bin/opt(_ZN4llvm15ScalarEvolution16computeExitLimitEPKNS_4LoopEPNS_10BasicBlockEb+0x5d0)[0x3955690]
build-all/bin/opt(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x33b)[0x39521ab]
build-all/bin/opt(_ZN4llvm15ScalarEvolution20getBackedgeTakenInfoEPKNS_4LoopE+0x14b)[0x3950bbb]
[...]
Segmentation fault (core dumped)


This seems to be old. I've tested on some old saved builds and it starts
crashing with a build from January 2017.

-- 
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/20200827/73ebeb8c/attachment.html>


More information about the llvm-bugs mailing list