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

    <tr>
        <th>Summary</th>
        <td>
            X86 backend crashed with assertion `Do not know how to soft promote this operator's operand!` for bf16 constants
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:X86
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          joker-eph
      </td>
    </tr>
</table>

<pre>
    
```
SoftPromoteHalfOperand Op #1: t7: v32bf16 = insert_vector_elt t5, t3, Constant:i64<1>

Do not know how to soft promote this operator's operand!
UNREACHABLE executed at llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:2940!
```

Repro with ` bin/llc -mtriple=x86_64-unknown-linux-gnu   -mcpu="znver4" `

```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare <32 x bfloat> @llvm.masked.load.v32bf16.p0(ptr nocapture, i32 immarg, <32 x i1>, <32 x bfloat>)

define void @dump_vec() {
  %1 = call <32 x bfloat> @llvm.masked.load.v32bf16.p0(ptr poison, i32 2, <32 x i1> poison, <32 x bfloat> <bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80, bfloat 0xRBF80>)
  ret void
}

```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVc1u4zgMfhrmQjiQKdtxDj64STNzGOws2l1gboVsMYmmimTIcn_m6Rdy0m6n-4PFznUAgRAJkh9JUaQaR3NwzA2UV1BuF2qKRx-ar_6eQ8bDcdF5_dyA2IJooRKXM7O3fh9_Df7kI39Udv954KCcxs8DAskcZItxleiDpG6fVwhyi8aNHOLdA_fRhzu2EWMJtMEoE914N0blIsjWVAXITQ7y-oI9061H5yPeO_-IR_-I0ePo9xGHcxgYj2ZEnwKJPgCtLozTQPnZw--_3Fy3m4_t1adr5Cfup8gaVURrH05AO2s6oN3Ga_7ADmh3y5b7aLzbth-Adp_4oKz5xjvrVfzteeBx2Q8DyJbWhXjFeFenM73hIXh8NPGIUAnsTHJvbY_ZKQYzWAa5faqru6rIJpcSdJk1bnrKDm5CxOzUDxPILRB9cw8cCiDCdxDvcKMKB46oVVRWPfspzi8ARJydQLacDbQSIFtJM0ls_j2bbukd2qrIzMtlXyejnOrM1elSvdhURXabUw1E3-Gfs3vB_qcUX60091aFpL-RhE_Y7VOtQV4jFCK90vKkxnvWS-uVXl56azkIoHqIAZ3v1RCnwKmfjCQ0p5MKh8S9eDRzV70RvEIArd_WU_PeOMYHb3QC19NpSJ0LKcc1wurqrIYIVOZzgr2y9v9GPngzevcSNv0l4jcKf4MgN2cGxdPN1a4WSe2n5KfkP0re9D5i4Dg3_eUvrLb_MmQWupF6LddqwU1e1WVRrWlNi2PT9bUSRSeJK-qVFCS4krLMdakrFlovTEOCpCilyFdlUdKyzkWV63693ucsCqqgEHxSxi7nv-PDYWHGceKmShYLqzq247y2iDrV37PTINsvdZVGSbldhCbZZd10GNP_M2Mc__QUTbTcfKkrvJhiH9R4ZH2e0GpMa8p4l0bsDy2dSuDeB5wXYH9Zb-NiCrY5xjiMIFugHdDuYOJx6pa9n7fQZRml-Ifgv3IfgXZz9iPQbi7AHwEAAP__03FHVA">