<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123862>123862</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Generation of Object file gets stuck in infinite loop after enabling RISCVVLOptimizer
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
michaelmaitland
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MaheshRavishankar
</td>
</tr>
</table>
<pre>
I hit an issue in downstream project (IREE), where the PR to enable the RISCVVLOptimizer gets stuck in an infinite loop (i.e. after https://github.com/llvm/llvm-project/pull/119461). Reverting that seems to resolve the issue.
[module_three_fry_linked_embedded_elf_riscv_64.optimized.ll.txt](https://github.com/user-attachments/files/18498078/module_three_fry_linked_embedded_elf_riscv_64.optimized.ll.txt)
This is the output after what is effectively `opt` phase. The downstream project uses the c++ interface to emit object files, so I cant really reproduce the command line options for the hang, But there is not much secret sauce here on how it is generating the object file (https://github.com/iree-org/iree/blob/8c7eecaadda7931724aae3ac371fb60c1fb01873/compiler/plugins/target/LLVMCPU/LLVMIRPasses.cpp#L98) . If someone can give me tips on how I can try to get the equivalent command line for `llc` that mimics what is done there, I am happy to try.
@michaelmaitland could you please provide guidance here. We have been reverting this patch downstream for a while, and it is getting hard for us to carry the revert.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVM2O2zYQfhr6MohAUZZtHXTIbuLCwAYJtml6NEbkSGRDkSpJ2XWfvqCsbTdBEaAoYIC0SQ-_n5kPYzSDI2pZ_cCEGI3USHZEkyw6xYRg9bsNzkn70H5ATVE_48VEje4rhk3n1a09gTYJ0IGJcSYwDpS_upgC4QhT8L-RTMDE4fT8_j0TDROPcNUUCJIm-PQMyQM57Oz9h-fTz49fvjx9nJIZzZ8UYKAUIaZZfs2l8zOuN84kAuv9lAubggrAPlEAndIUWfWWiSMTx8EkPXeF9CMTR2svL8ubFRUTx2m2loljWTbbXclEU8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