<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61574>61574</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"LLVM ERROR: Function @f510 changed by GVNPass without invalidating analyses" with opt -verify-analysis-invalidation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mikaelholmen
</td>
</tr>
</table>
<pre>
llvm commit: 3e79dfac0ea7b
Reproduce with: ```opt -passes="ipsccp<no-func-spec>,gvn" bbi-80466.ll -o /dev/null -verify-analysis-invalidation```
Result:
```
LLVM ERROR: Function @f510 changed by GVNPass without invalidating analyses
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: ../..//main-github/llvm/build-all/bin/opt -passes=ipsccp<no-func-spec>,gvn bbi-80466.ll -o /dev/null -verify-analysis-invalidation
#0 0x0000000002e64808 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../..//main-github/llvm/build-all/bin/opt+0x2e64808)
#1 0x0000000002e6239e llvm::sys::RunSignalHandlers() (../..//main-github/llvm/build-all/bin/opt+0x2e6239e)
#2 0x0000000002e64e86 SignalHandler(int) Signals.cpp:0:0
#3 0x00007f7f1b0bd630 __restore_rt sigaction.c:0:0
#4 0x00007f7f18804387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f7f18805a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x0000000002de038b llvm::report_fatal_error(llvm::Twine const&, bool) (../..//main-github/llvm/build-all/bin/opt+0x2de038b)
#7 0x00000000030e7383 void llvm::detail::UniqueFunctionBase<void, llvm::StringRef, llvm::Any, llvm::PreservedAnalyses const&>::CallImpl<llvm::PreservedCFGCheckerInstrumentation::registerCallbacks(llvm::PassInstrumentationCallbacks&, llvm::AnalysisManager<llvm::Module>&)::$_15>(void*, llvm::StringRef, llvm::Any&, llvm::PreservedAnalyses const&) StandardInstrumentations.cpp:0:0
#8 0x00000000027d3015 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (../..//main-github/llvm/build-all/bin/opt+0x27d3015)
#9 0x0000000000b36a4d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#10 0x00000000027cdb4b llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (../..//main-github/llvm/build-all/bin/opt+0x27cdb4b)
#11 0x0000000000735773 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) (../..//main-github/llvm/build-all/bin/opt+0x735773)
#12 0x0000000000743d72 main (../..//main-github/llvm/build-all/bin/opt+0x743d72)
#13 0x00007f7f187f0555 __libc_start_main (/lib64/libc.so.6+0x22555)
#14 0x000000000072e9d0 _start (../..//main-github/llvm/build-all/bin/opt+0x72e9d0)
Abort (core dumped)
```
This starts happening with the improved verification in https://reviews.llvm.org/D146003
[bbi-80466.ll.gz](https://github.com/llvm/llvm-project/files/11026368/bbi-80466.ll.gz)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMV11z6jgS_TXiRQUlJH_xwAMhYfbWJjupJHtfKdlqG22E5JVkMuyv35IMATNJ6u7lbtWkAjay3H3O6VZLzZ2TjQaYo_QGpbcj3vmNsfOtfOWgNkZtQY9KI_ZzpXZbXJntVnrEFphBPhM1rwjwvETkFpHFE7TWiK4C_Cb9JkxC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