<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opt -loop-unroll -iv-users crashes when doing "Freeing Pass 'Induction Variable Users' on Loop '<deleted>'...""
   href="https://bugs.llvm.org/show_bug.cgi?id=44226">44226</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt -loop-unroll -iv-users crashes when doing "Freeing Pass 'Induction Variable Users' on Loop '<deleted>'..."
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mikael.holmen@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22895" name="attach_22895" title="bbi-36444.ll reproducer">attachment 22895</a> <a href="attachment.cgi?id=22895&action=edit" title="bbi-36444.ll reproducer">[details]</a></span>
bbi-36444.ll reproducer

llvm version: f3dafd21a36f

Reproduce with:
 opt -o /dev/null bbi-36444.ll -loop-unroll -iv-users

Result:
Stack dump:
0.      Program arguments: build-all-builtins/bin/opt -o /dev/null bbi-36444.ll
-loop-unroll -iv-users 
1.      Running pass 'Function Pass Manager' on module 'bbi-36444.ll'.
2.      Running pass 'Loop Pass Manager' on function '@test'
3.      Releasing pass 'Induction Variable Users'
 #0 0x0000000003e69574 PrintStackTraceSignalHandler(void*)
(build-all-builtins/bin/opt+0x3e69574)
 #1 0x0000000003e6725e llvm::sys::RunSignalHandlers()
(build-all-builtins/bin/opt+0x3e6725e)
 #2 0x0000000003e6997c SignalHandler(int)
(build-all-builtins/bin/opt+0x3e6997c)
 #3 0x00007efe32333890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x000000000303e185 llvm::IVUsersWrapperPass::releaseMemory()
(build-all-builtins/bin/opt+0x303e185)
 #5 0x0000000003709b4f llvm::PMDataManager::freePass(llvm::Pass*,
llvm::StringRef, llvm::PassDebuggingString)
(build-all-builtins/bin/opt+0x3709b4f)
 #6 0x00000000030be57d llvm::LPPassManager::runOnFunction(llvm::Function&)
(build-all-builtins/bin/opt+0x30be57d)
 #7 0x000000000370c683 llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all-builtins/bin/opt+0x370c683)
 #8 0x000000000370c968 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all-builtins/bin/opt+0x370c968)
 #9 0x000000000370cfcd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all-builtins/bin/opt+0x370cfcd)
#10 0x000000000207cdaa main (build-all-builtins/bin/opt+0x207cdaa)
#11 0x00007efe30dbfb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#12 0x000000000206502a _start (build-all-builtins/bin/opt+0x206502a)
Segmentation fault (core dumped)

-debug-pass=Executions gives

[2019-12-05 09:54:16.848083739] 0x51f7480   Executing Pass 'Function Pass
Manager' on Module 'bbi-36444.ll'...
[2019-12-05 09:54:16.848188364] 0x51fc2e0     Executing Pass 'Dominator Tree
Construction' on Function 'test'...
[2019-12-05 09:54:16.848226289] 0x51fc2e0     Executing Pass 'Natural Loop
Information' on Function 'test'...
[2019-12-05 09:54:16.848261630] 0x51fc2e0     Executing Pass 'Canonicalize
natural loops' on Function 'test'...
[2019-12-05 09:54:16.848300952] 0x51fc2e0     Made Modification 'Canonicalize
natural loops' on Function 'test'...
[2019-12-05 09:54:16.848325816] 0x51fc2e0     Executing Pass 'LCSSA Verifier'
on Function 'test'...
[2019-12-05 09:54:16.848348655] 0x51fc2e0     Executing Pass 'Loop-Closed SSA
Form Pass' on Function 'test'...
[2019-12-05 09:54:16.848382808] 0x51fc2e0     Executing Pass 'Basic Alias
Analysis (stateless AA impl)' on Function 'test'...
[2019-12-05 09:54:16.848411025] 0x51fc2e0     Executing Pass 'Function Alias
Analysis Results' on Function 'test'...
[2019-12-05 09:54:16.848436098] 0x51fc2e0     Executing Pass 'Scalar Evolution
Analysis' on Function 'test'...
[2019-12-05 09:54:16.848475001] 0x51fc2e0     Executing Pass 'Loop Pass
Manager' on Function 'test'...
[2019-12-05 09:54:16.848507828] 0x51fd370       Executing Pass 'Unroll loops'
on Loop 'do.body'...
[2019-12-05 09:54:16.848693960] 0x51fd370       Made Modification 'Unroll
loops' on Loop '<deleted loop>'...
[2019-12-05 09:54:16.848724062] 0x51fd370        Freeing Pass 'Unroll loops' on
Loop '<deleted>'...
[2019-12-05 09:54:16.848745015] 0x51fd370        Freeing Pass 'Unroll loops' on
Loop '<deleted>'...
[2019-12-05 09:54:16.848763733] 0x51fd370        Freeing Pass 'Induction
Variable Users' on Loop '<deleted>'...

Old passmanager problem perhaps?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>