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

    <tr>
        <th>Summary</th>
        <td>
            DAGCombiner.cpp:14356: llvm::SDValue (anonymous namespace )::DAGCombiner::visitFREEZE(llvm::SDNode *): Assertion `DAG.isGuaranteedNotToBeUndefOrPoison(R, false) && "Can't create node that may be  undef/poison!"' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:codegen,
            crash
      </td>
    </tr>

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

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

<pre>
    ```
target triple = "x86_64-unknown-linux-gnu"

define void @foo(ptr %alloc32, i32 %0, i32 %.zext) {
entry:
  %1 = or i32 %.zext, %0
  %.lhs.trunc = trunc i32 %1 to i16
  %.lhs.trunc.frozen = freeze i16 %.lhs.trunc
 %2 = zext i16 %.lhs.trunc.frozen to i64
  %Arg_0.14 = getelementptr [3 x [3 x [32 x [32 x float]]]], ptr %alloc32, i64 0, i64 0, i64 0, i64 %2, i64 0
  %Arg_0.15 = load float, ptr %Arg_0.14, align 4
  store float %Arg_0.15, ptr null, align 8
  %3 = or i32 %0, 1
  %4 = or i32 %.zext, %3
  %.lhs.trunc39 = trunc i32 %4 to i16
  %.lhs.trunc39.frozen = freeze i16 %.lhs.trunc39
  %.lhs.trunc43 = trunc i16 %.lhs.trunc39.frozen to i8
  %5 = udiv i8 %.lhs.trunc43, 3
  %6 = zext i8 %5 to i64
 %Arg_0.110 = getelementptr [3 x [3 x [32 x [32 x float]]]], ptr %alloc32, i64 0, i64 0, i64 0, i64 0, i64 %6
  %Arg_0.111 = load float, ptr %Arg_0.110, align 4
  store float %Arg_0.111, ptr null, align 4
  ret void
}
```

```
$ llc < bugpoint-reduced-simplified.ll

llc: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14356: llvm::SDValue (anonymous namespace)::DAGCombiner::visitFREEZE(llvm::SDNode *): Assertion `DAG.isGuaranteedNotToBeUndefOrPoison(R, false) && "Can't create node that may be undef/poison!"' failed.
```

cc @LebedevRI @RKSimon 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVcFu4zYQ_Rr6QlgQh5JsHXRQ7HVQtNgWSdtDLwtKHMns0qRBUmmSry8oObESu9k9FCgKCBJFzHsznPdICu9VbxArkt-QfLsQQ9hbV8n066Kx8qkiRXp60i1J6yBcj4EGp44aKeFbSgAe18WXIlsO5quxf5mlVmZ4XPZmIAATanpL7JRB-mCVpCRLO2sJrI_BUQK50Nq2HAhsqOIQZ9LZOHnGx0CgpGR1M3GhCe6J8BMzjUFsLMe6d6DNRHaOS_TeJ8ENph0B0-iEYTRYqlhxNTzpnH1GM6I6h_iMMfRtzAlIIIcxLtZwGfXCFJMV2SxZ7fovacKyEdtjQI0HNGFsUn7D6eP8A7Nvp60IJN-eH9jQK70tMpr-8yCWfZ68KCsfy9JWyFO-c46XwuOU0Ko39HVZPliHE2DO9QI2g9Zn1HqWlb8TdCyTzQKyDxTnVyXk5aXm2Uea8_J7VOflVXDG59kuQXMbzBc-9XmQ6oGq9XvKuL754oqZz9YT-o2tzi1n6X9kq7m_iktbMfZNX7H0u43F2HVnvcIchvEMOh1Nq-1p8Paguz4JGdU6nhsb2gz90SoTlg7l0KJcenU4atUplInWcxKtW8JrqvXDgcBOq4bAbmMl3qIhsLtHjW1Q1mzrWwK7bX27sYdGGXRJezwSXrOM58UrAa8Jr--3vws9ICWwFsaap4MdPDXigP4oWiRQTmEzrmniQXkVdnefPv3xicB6zvfZykhXT1hae48uFkVJkW7r20T520E4YQKi_GzDr_YGfzMSu5_dL1Z5awis72KvO6E9jic1FASi42EjDIFVoK1DEZCamCnsRaAH8UQbpEPkIbA7nohYvDZgRTuhNMrkA3XaNt4jP2GDEh_ufog_dz_eq4M1dCErLkteigVWrFhxnsIqzxf7qpW4Ktey6Va8AdnkhUxXuG6ahmHJoGkXqoIUeMrSEoCVLE8K1pQcurRjwKXkOclSPAilk9i_xLp-obwfsMrLMs0XWjSo_XibApw63FqJfRQ7bhYC0Drh9_Ev3y5cFYOWzdB7kqVa-eDPxEEFjdW_YAn6P_PEt0yxGJyu9iEcfSwWdgR2vQr7oUlaO26y016LrT06-ye2gcBu1MkT2I1S_R0AAP__-1OOlw">