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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64] Cannot select: t4: nxv4bf16 = fp_round t2, TargetConstant:i64<0>
        </td>
    </tr>

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

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

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

<pre>
    Loop vectorizer creates these vectors if there are bf16 types in the input

```
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64-unknown-linux-gnu"

define <vscale x 4 x bfloat> @Conv.9(<vscale x 4 x float> %wide.masked.load) {
  %f = fptrunc <vscale x 4 x float> %wide.masked.load to <vscale x 4 x bfloat>
  ret <vscale x 4 x bfloat> %f
}
```

```
$ llc -mtriple=aarch64-linux-gnu -mcpu=neoverse-n2 < t.ll
LLVM ERROR: Cannot select: t4: nxv4bf16 = fp_round t2, TargetConstant:i64<0>
  t2: nxv4f32,ch = CopyFromReg t0, Register:nxv4f32 %0
    t1: nxv4f32 = Register %0
  t3: i64 = TargetConstant<0>
In function: Conv.9
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVF2v4jYQ_TXOyyjIXwnhIQ9ZWKRKt6pEq75WJpmAe40d2RP23v76ygF2L-12nyqBo5mcOXPmIzYp2ZNHbFn1iVW7wsx0DrEd-GtxDMN7-xLCBFfsKUT7F0boIxrCBHTGhPcXCeyYHRHBRITjKGqg9wkTWJ_9YP00E-M7xrv7WfP7bzHJxBMSDIaMM-9hJmBqB0xKLC9MdVjahqku_5UsraiZ6pYjW7Vmqqt1aYXMACGb0it58_2arX02pXzKRNFODh9ZjIn9udbl7F99-OJLZ_38Vp78_DXsdg44Wp-jttfUG4fwBhre4Di6YIipz8A03wZ_XW1Y1vKM-gaS1Rc74Opi0isOKxfMwOQG2PrTLQtkxLhoGyeKs-__lfFHXEDhvxU-MkSkH5Uhq_Fe93r33YF93yk1ONdDebm1l6ndo7NfOwrlpZ9mpnYewxVjwtLLrARo5dyN5uXl95_h8-Hwy4GpDrbG-0CQ0GFP2UF53uDfrnrZs1ub_ohh9gOQZHILvy0z3gafyPgcs-zIln-on-SDZMzLse3PC9E2TO_7GC4HPAHxzHXAk02Ekanujs7d4Q8eABIfmBaSR8gTkFSG2VovkH8q_KDtJw_j7HuywS_l39bpud3F0KphozamwFasRcOFruqqOLe1EFzrteLVEdfYDGPfCNmsdVWbQfQbLGwrudS8FlxwUfNqpblUile6qYZGNFXFNMeLsW7l3PWyCvFU2JRmbDd6U4nCmSO6tFwVUh5N_4p-YKrrumXK-WupdkVsc2x5nE-Jae5sovSNjSy55a55xFS7_3nExRxdeyaaElMdk3sm9ydL5_m46sOFyX2Wcn-UUwx_5pxyv1SZmNzfCr228u8AAAD__1zYfio">