<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81128>81128</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Opt passes= doesn't work if the first one is a function pass
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JonChesterfield
</td>
</tr>
</table>
<pre>
OK:
`opt --passes=inline,instcombine whatever.ll -S`
Fails:
`opt --passes=instcombine,inline whatever.ll -S`
unknown function pass 'inline'
I think if the first pass named is a module pass, putting several in sequence works as expected. If the first is a function pass, it fails to find the later ones. Discovered writing tests for other passes.
This seems unlikely to be intended behaviour, though I can't find documentation for passes= so maybe it was. It's not helpful behaviour.
Ideally one should be able to string a long sequence of comma separated passes together and have them all run, without opt failing to find some passes on some permutations.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEk82O6zYMhZ9G3hAxFOXHnoUXtzMIkHZxF-0L0BYdqyNLrkglnbcv5OTeyaBAu7HhHx5-55BCZncJRJ06_KIObxVmmWLqfo3hdSIWSqMjb6s-2o_u-29q903pN6W_qaOOi8BmsyAzsdq9ueBdIGVeXWAZ4ty7QHCbUOhKqfYeYPO7OupH-Xo9ofP8n5I_lVZd__-SObyHeAsw5jCIiwGKGCjT_MBr4Pn3M8jkwju4EWQiGF1iuZcEnMmCY0CYo82e1tfKvMKSRVy4ABcK9OACMP2VKQwEt5jeGZCB_l5oELI1nJ-lV70vbEXRCYwlCpAIowt2LfAolCAG4hreHA_xSoks3JJbuwuxMIwxQZSJEtxDq5_N_TE5BiaaGXLw7p38R-nQE7ggFCxZ6GnCq4s5FQyZYr5McIYBgzKN3FlsHPJMQXBFLg1_zgc4wowfRVDghlzDWZRpGEIUmMgvY_afLb6wnS2h9x_FH_AUsy8sgL2ngsiSikcEH9egH-nGEYY4zwhMCyYUsg8WkHihNQYMFia8UolwBvQeUg7F3M0VewJlxUrYa4aPuDnO9EMphscjpTnfTXNd2W5nX3YvWFG3bXSze9m3eltNXX8Yd9RujW5GssNOI6I-tMe2pRc6NntTuc5os9dGt1tjtN7WerCtxgM2RzqM9jCovaYZna-9v851TJfKMWfq2u3WtJXHnjyvZ9OYQDdYPypjylFNXanZ9PnCaq-9Y-FPFXHiqfu-yNO4bCS-T7bs6delL4P493ZWOfluElnWY2pOypwuTqbc10OclTmVdo_bZknxTxpEmdMKycqcVhP_BAAA___vH3mY">