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

    <tr>
        <th>Summary</th>
        <td>
            GlobalISel needs fmul by 1 combine
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            globalisel
      </td>
    </tr>

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

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

<pre>
    ---
name: fmul_1
tracksRegLiveness: true
body:             |
 bb.0:
    liveins: $vgpr0

    %0:_(s32) = COPY $vgpr0
 %9:_(s32) = G_FCONSTANT float 1.000000e+00
    %10:_(s32) = G_FMUL %0, %9
    $vgpr0 = COPY %10(s32)
    SI_RETURN implicit $vgpr0

...

lc -march=amdgcn -start-after=irtranslator -stop-after=instruction-select shows this isn't folded out. These can appear during legalization. If you just write an IR testcase, it's difficult to observe since it seems to fold out before reaching IRTranslator
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8-P4jYU_mucy1MixyFADjmwUEZI29mKYQ89Idt5Sbx1bOTnsJr-9ZVhWmg7vkT29-N9L9IniczgEFtWf2H1LpNzHH1oZSB0U6Z8997mec74jvGNkxOyagP9NNtzeX-LQeo_6IjDV3NFh0SJEMOMdzgZpJfnw1bbOwhKFZxVm48bAFhzReNuHkwsrsMl8Dv4oDBRJ82ZiTVVgokGWLWD7bfffv-PJDGb_zNfzvvtt9e30-b1BL31MkJZ8NtBJr5w_q9J5SejXs77X79_vecQ2_uUJ809wnOo5PK3w4P5djgffzl9P76CmS7WaBM_Xbkoiuer1ZBPMuiRVTs5dYN2kFOUIeayjxhYtTMhBunIyuhDwvzlATmKYdbReJcTWtQRaPQ_CeJoCAw5JlYRem877MDPsYDTiISgpQN5uaAM0M3BuAEsDtKaP2WyKuDQw7uf4cdMEX4GExGkg8MRIlLUkjD9JhOZWBF0pu-Nnm2E6MErwnBFIOM0golAiBMlJGVICUBh7wNCQKnHNPhwPP2zXda1VddUjcywLZfrZsXrpqmzseUdr7uyrmqscFnXHBWuS9V3gpdLWfMqM63gouKrcl2uF8uqLhZLrpRUi7JcadULwRYcJ2lsYe11KnwYMkM0Y7usmgXPrFRo6dYYIQbrlbSG0DIhUoNCm0S5mgdiC24NRXrYRBMtti83zeENLTjEjm6NAvUOJWg_KeMwm4NtxxgvqQtM7JnYDyaOsyq0n5jYJ8OPT34J_gfqyMT-FpKY2N9y_hUAAP__aIUozg">