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

    <tr>
        <th>Summary</th>
        <td>
            [InstCombine] FMF flags should not be propagated
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            miscompilation,
            llvm:instcombine
      </td>
    </tr>

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

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

<pre>
    Alive2: https://alive2.llvm.org/ce/z/ajCxTh
```
define float @src1(float noundef %x, float noundef %y, float noundef %z) {
  %s = call float @llvm.copysign.f32(float %y, float %z)
  %r = call nnan float @llvm.copysign.f32(float %x, float %s)
  ret float %r
}

define float @tgt1(float noundef %x, float noundef %y, float noundef %z) {
  %r = call nnan float @llvm.copysign.f32(float %x, float %z)
  ret float %r
}

define float @src2(float noundef %x, float noundef %y, float noundef %z) {
  %s = call float @llvm.copysign.f32(float %y, float %z)
  %r = call ninf float @llvm.copysign.f32(float %x, float %s)
  ret float %r
}

define float @tgt2(float noundef %x, float noundef %y, float noundef %z) {
  %r = call ninf float @llvm.copysign.f32(float %x, float %z)
  ret float %r
}

define float @src3(float noundef %x, float noundef %y, float noundef %z) {
  %s = call float @llvm.copysign.f32(float %y, float %z)
  %r = call nsz float @llvm.copysign.f32(float %x, float %s)
  ret float %r
}

define float @tgt3(float noundef %x, float noundef %y, float noundef %z) {
  %r = call nsz float @llvm.copysign.f32(float %x, float %z)
  ret float %r
}
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUVd-Koz4YfZrPmzAl-VJrvfDCaRF-F7-7fYEYo2aIiSSx2_bpFzvOdMss7B9kYECUnJDz5ZwDHhGC7qxSBaTPgNhEeb5evgMipMdETLF3vljApHbNpSiNPikEXpI-xjEALwErwErc8I0xp2HjfAdYSQVYXeetl8P5Ww-0hB1dHlo2qtVWkdY4EQlsafCSAe5f19ZNtlEtAUzPgAfyAb38Er0C5gSyZ6AlmdeBAD8SKYy5z7ldULrxMuvetBzfhz7SLnRvVP5OZa2wf8h3fuALb3xexTvqZ2Oy4_z-6Ers4uqurCHl-vdSgpf4RQLWtv3EgFd3ZQ0p_xYw_yIBh-sn5ru6KSso-W28P_2pk6bgTc5zkaiCZTzNMN_taNIXQlEu6l2d1Tnb7dletpjlrcxSkdXIU0x0gRRTyihjjGZbummoYkw1Elku2i3nsKVqENq810aiQ5hUwZBtOSZG1MqEpZoGHaQbRm1E1M7ODYUHQJxPAi-1DVG6odZWLeXli3nrqZ66MHujQwz3MVFHc-u8_2yIh-VceiTV_xVpjegCCb2bTEOsi6RWZPRuFJ2Iqkkmb4rH6ut07Kd6I90AWN3u8_p5Gr17UTICVjdZAbBalJ0K_BEAAP__lflFRw">