<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/73180>73180</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
flang-new driver does not enable some LLVM optimizations
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
performance
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vzakhari
</td>
</tr>
</table>
<pre>
LLVM [PassBuilder](https://llvm.org/doxygen/classllvm_1_1PassBuilder.html) relies on `PipelineTuningOptions` to enable some LLVM optimizations. For example, `clang` [enables](https://github.com/llvm/llvm-project/blob/a8450619358c3de23b72aef7c1fd932bca112257/clang/lib/CodeGen/BackendUtil.cpp#L808) SLP vectorization at higher optimization levels. `flang-new` [does not](https://github.com/llvm/llvm-project/blob/a8450619358c3de23b72aef7c1fd932bca112257/flang/lib/Frontend/FrontendActions.cpp#L970) do this.
I think we need to align the optimization pipelines between `clang` and `flang-new`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8k0lv2zwQhn8NdSEiSENrO-gQx9CHD3DRAF2uAZexxIYiBZJ2ll9fUHbauChQ9NKLJIw4w3ned4aHoEeL2JNqS6pdxo9xcr4_vfLHiXudCade-v3-6wdKqu09D2F71EahJ9WOQDvFuATCbgkMBAZjTnPu_EhgUO75ZURLYJCGh5D-PJQP5bsC-RRnQ6CjHo3GQJ2lpC7u9YJGW_x8tNqOH5eonQ2kLmh0FC0XBmlwM9K1I7dEPetXvh7KKR2cp_jM58UggbtUThpux5ROqu05Pfyu8VHH6Shy6eYLxeV1s3j3DWUkMAjjBIGBt5uqqMuOVa1kCoGJBjgeGlkeVMdASF6WAFVzBrdJCqNT4p1T-N8qyJbLR7TqS9Qml8tCgO3bok1KfNrf0xPK6PwFivJIJz1O6K9YqcETmpAnwkO65cbi04VSOQzUuvjPMA9XmIN3NqJV7z5v5dmfC2vXFIlVORonHXJS7Ehxe37-n0L2kT4htYgqec6NHi2NE14LsFzGJFCB8QnRXpnNrfpVmjxTPVMd63iGfdkURd2VHdTZ1JesUBtRNqLiLcpaNEyU7QZUqapOtqzOdA8FsMQLABXUuawOWLXNgSHHhrOGbAqcuTb52_xnOoQj9g0r2yIzXKAJ63oBoJ24lTijjQSAwB0BWNAfnJ9TPMWqXeb71RVxHAPZFEaHGH7Wjjoa7H-wUeX1CT198_0PW5Idven_eipWnkBgWJG-BwAA___9Z1vJ">