[llvm-bugs] [Bug 50783] New: Crash as exhaust the stack in unroll loops while recursion call createSCEV

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 21 00:55:56 PDT 2021


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

            Bug ID: 50783
           Summary: Crash as exhaust the stack in unroll loops while
                    recursion call createSCEV
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: zhongyunde at tom.com
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

When compile with -O3, it is tried to complete unroll the loops, then it crash
as the recursion call of function createSCEV to deep, and exhaust the stack.

clang -mcpu=tsv110 -O3 test-creduce6.c

2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'test-creduce6.c'.
4.      Running pass 'Loop Pass Manager' on function '@foo'
5.      Running pass 'Unroll loops' on basic block '%for.cond1.preheader


=================== test case =============================
~/test/issue2292 ยป cat test-creduce6.c
                                                                               
                                   zyd at bisheng-develop
char a;
long b, c;
int d;

short foo() {

  for (c = 2; c; c++) {
    for (b = 10; b < 35; b++) {
      int *g = &d;
      *g |= 8;
      for (a = 8; a < 76; a++) {
        g = &c;
        c *= *g;
      }
    }
  }
  return 0;
}

-- 
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/20210621/51824d44/attachment.html>


More information about the llvm-bugs mailing list