<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 - loop-extract pass crashes with Assertion `!LocalChanged && "A pass trigged a code update but the update status is lost"' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=48065">48065</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>loop-extract pass crashes with Assertion `!LocalChanged && "A pass trigged a code update but the update status is lost"' failed.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Loop Optimizer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>cszide@163.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24129" name="attach_24129" title="small.bc">attachment 24129</a> <a href="attachment.cgi?id=24129&action=edit" title="small.bc">[details]</a></span>
small.bc

$clang -v
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
ba10c514c9712b99197935a82f0df8d285752bdf)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$clang -O3 -c -emit-llvm -femit-all-decls -mllvm -disable-llvm-optzns small.c
-o small.bc

$opt -sroa -structurizecfg -jump-threading -loop-extract small.bc -o
small-opt.bc
opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/llvm/include/llvm/PassAnalysisSupport.h:276:
AnalysisType& llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&,
bool*) [with AnalysisType = llvm::DominatorTreeWrapperPass; llvm::AnalysisID =
const void*]: Assertion `!LocalChanged && "A pass trigged a code update but the
update status is lost"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt -sroa
-structurizecfg -jump-threading -loop-extract small.bc -o small-opt.bc 
1.      Running pass 'Extract loops into new functions' on module 'small.bc'.
 #0 0x00005579dfa6c8ec llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2c1a8ec)
 #1 0x00005579dfa6a5c4 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2c185c4)
 #2 0x00005579dfa6a733 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2c18733)
 #3 0x00007fd17ebd98a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
 #4 0x00007fd17d88bf47 raise
/build/glibc-2ORdQG/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007fd17d88d8b1 abort /build/glibc-2ORdQG/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007fd17d87d42a __assert_fail_base
/build/glibc-2ORdQG/glibc-2.27/assert/assert.c:89:0
 #7 0x00007fd17d87d4a2 (/lib/x86_64-linux-gnu/libc.so.6+0x304a2)
 #8 0x00005579df4005ee llvm::DominatorTree&
llvm::function_ref<llvm::DominatorTree&
(llvm::Function&)>::callback_fn<(anonymous
namespace)::LoopExtractorLegacyPass::runOnModule(llvm::Module&)::'lambda'(llvm::Function&)>(long,
llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x25ae5ee)
 #9 0x00005579df400c37 (anonymous
namespace)::LoopExtractor::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x25aec37)
#10 0x00005579df400f6c (anonymous
namespace)::LoopExtractorLegacyPass::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x25aef6c)
#11 0x00005579df28b636 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x2439636)
#12 0x00005579dd6d9df4 main
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x887df4)
#13 0x00007fd17d86eb97 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344:0
#14 0x00005579dd78e43a _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm-project/build/bin/opt+0x93c43a)
Aborted (core dumped)

$ cat small.c
int a, c;
char b;
float d() {
  short e = 1;
  for (; b <= 3; b) {
    char f;
    int g, h, i;
    if (c)
      continue;
    for (; e;)
      return a;
  }
}</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>