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

    <tr>
        <th>Summary</th>
        <td>
            [flang] TargetRewritePass does not propagate fast-math flags
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

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

<pre>
    ```fortran
subroutine s(a, b)
  complex(kind=8), intent(inout) :: a, b
  a = a ** b
end subroutine s
```
```shell
flang -mmlir --mlir-print-ir-before-all -S t.f90
# before
    %5 = fir.call @cpow(%3, %4) fastmath<contract> : (complex<f64>, complex<f64>) -> complex<f64>
# after
    %9 = fir.call @cpow(%5, %6, %7, %8) : (f64, f64, f64, f64) -> tuple<f64, f64>
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8kt2OnCAUx5_meEOc4EH8uPDCzuxcN21fABWUFsEA7rZv3-C43TbbbGL8G47_w-98iBD0bKXsgH8CfsvEHhfnOxEW6VdhR22lMTob3PSrg4o-HuV89MIC7cM-eLdHbSUJgI0AvJIBsAXaEzK6dTPyJ2DzQ9sJ2K1JEbwSbaO0EbDR1u0RsCXAemA9Of3JLAiwW3pjD9gfh9JO5J8Laf8H6e_vsEhjgPbKCDuTfF2N9iTPk-Sb1zbm2ueDVM7LXBhD8q8kXlR75EBGHpEDghBAzg8Spf1lTH9DScfNvQA2gJwlYEBepiKUCHEVcQF2HZ2NXowR2FOqjQA2r91gV1WVwJ6S8_1ZS_LkeRd4oAkVpX8jaz8g4ydZdWp9anO2OyGl3Hgl_5ETI-6bkSfEGXqwvLY6mzo2tawVmeyKmjWMVzWrsqUrGyGommhR1bwoVDUwVmOlaKOwbqe6znSHFDktWIGUY1FdsKGtmOQwUFW09cSgpHIV2lyMeV4vzs-ZDmGXXYEc2yIzYpAmHGuLeEwaENMG-y4Z8mGfA5TU6BDDW4qoozl2_eHgN_JN-FnGL_LF6yg_ixDI5GQg1kWyebeJWUR5TDZPoyXKiDlkuzfdEuMW0t7iHfA-67jsw2V0K-A9XXdKvnn3XY4R8H7gB8D7WcFzh78DAAD__zhCAgk">