<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60439>60439</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [newgvn] IR test fails with Assertion `ProcessedCount[V] < 100 && "Seem to have processed the same Value a lot"' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          TatyanaDoubts
      </td>
    </tr>
</table>

<pre>
    This bug was found by Azul FuzzGen IR test generator.

https://godbolt.org/z/E6dn8T8o6
Run opt with -passes='newgvn'

There are other open issues on this Assertion, but there are no movements on them.

Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes=newgvn <source>
 #0 0x000055db6807bf1f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3a39f1f)
 #1 0x000055db680798e4 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007ff2e9e2b420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #3 0x00007ff2e98f800b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #4 0x00007ff2e98d7859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x00007ff2e98d7729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #6 0x00007ff2e98e8fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #7 0x000055db67e3ec25 (anonymous namespace)::NewGVN::updateProcessedCount(llvm::Value const*) NewGVN.cpp:0:0
 #8 0x000055db67e4cc9e (anonymous namespace)::NewGVN::iterateTouchedInstructions() NewGVN.cpp:0:0
 #9 0x000055db67e51003 (anonymous namespace)::NewGVN::runGVN() NewGVN.cpp:0:0
#10 0x000055db67e52320 llvm::NewGVNPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3810320)
#11 0x000055db6841b686 llvm::detail::PassModel<llvm::Function, llvm::NewGVNPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3dd9686)
#12 0x000055db657abca4 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x1169ca4)
#13 0x000055db677d41af llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x31921af)
#14 0x000055db657929f6 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x11509f6)
#15 0x000055db677d232a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x319032a)
#16 0x000055db65320e85 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xcdee85)
#17 0x000055db6523aaa3 main (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xbf8aa3)
#18 0x00007ff2e98d9083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#19 0x000055db6531291e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xcd091e)
Compiler returned: 139
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWF1P47wS_jXujdXKsfPli150YbsHncMetFTcVk4ySf1uYkf-AMqvf-WkQMN2Eexy8X5IQILteWbm8eNRPMJa2SiAJUo-oeR8JrzbabPcCLcXSpxrXzg7K3S1X2520uLCN_hOWFxrrypc7PHqwbd47R8evoDCF9-wA-twAwqMcNosEDlHZDX-3TnXW8RWiK4RXTe6KnTrFto0iK4fEF1_TiuVb3Kdjsu_eYV17_CddDs874W1YBE7RzRTcNfcKkSzY_TNDgxgYQBrtwODdQ8KS2s9WKwVdiH6lbVgnNQK0TNceIfdk5HSuNO30IFyh_XQTaK_dqL8jivf9SGFYYgsEOFXRjdGdFiYxg_WiK0womvdO0TXpe562YKZw33fagMmjLVCNXPxGIudO-PVd0TXhVSjIZ7rACH6PvzvXe_dwuL59RENIwcYsTOrvSkBsc9jUBhRRjC5J4SQJKmKNCdZUUc1btvbLoTOVnZvx5crI5UbEtsYUQKi-fMiI-622joDokM0DYRJ5RDlGNH8N9ND9BO5Z4LxOqoR5c9xRy_i5jnE-Fo2SrT_EapqA35-CGMctouyDxtCht8nIHoAyuqaAgdaxJTg7daAddrA1rhDFq0sEF3f5-k2jeetVP5-3ig_TvRuZ0BUC6sXZIg4imNKJvGyiZu8zgkpsBHSwhvwy4CcDsgxI6SYIMdT5CrLE45Fod8U-REypXnCJ8jJS-TsaU_fjJnRKWY6xYS8rtL3YTJWV-kEMzvWQgYMSpoETKG02nfaW6xEB7YfdMtHzX6Fuy83X8d331fCwZXRJVgL1Zn2QTdHAr8RrQdcamUdoqsgqdH8tKLyaThxWXJ4TzjShYoIG-3LHVQXyjrjy-F8DDy97pxPnScRIew9zo1X4f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