<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/154492>154492</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[x86] LLVM ERROR: Cannot select: t28: v8i32 = X86ISD::CVTTP2UI t27
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:X86,
crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nikic
</td>
</tr>
</table>
<pre>
```llvm
; RUN: llc -mattr=+avx512f < %s
define <16 x i32> @test() {
%res = call <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float> zeroinitializer, <16 x i32> zeroinitializer, i16 255, i32 4)
ret <16 x i32> %res
}
```
Results in:
```
LLVM ERROR: Cannot select: t28: v8i32 = X86ISD::CVTTP2UI t27
t27: v8f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
```
Note that CVTTP2UI originally had v16i32 result and was narrowed to v8i32, so it now requires `+avx512vl` as well, leading to a selection failure.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsVMFu2zgQ_ZrRZRCBGpoSfdBBtmIgQLYtvEnQ24KSaJsbmmxJykn79Qsq3i62m-MeKwiiRL5582ZGMypGc3RatyA2IPpCzenkQ-vMsxmLwU_fWqjZ223t5QysA77B_eMH4B1aO-LNWaUUgPdAG3V5FRUdEPgWgUQE1k36YJzOO1WNr2g4Ab9FWLGkYwKSQGuEZgOsw2wSdETgPY7K2neMsoTyVdblm6fyrOJzOV5S-hJpnr6WoqLMebU7WK9StvyugzfOJKOs-a4D0PZn7ncQpqqRhFheOeEKaL2oDDr9R9kiPOem6fPz74wB6_Y6zjZFNA5499PZ_f3Tb3i733_c52RulXM-YdRWjylvpBxJhxeZ3eekfJb13e995uHd9unh4RM93mGiZpGV1wV9uKI3j3f3_R9Pt9uHj3vceheTcmn3CXh3yKq3rGTLpYE2jAG_zZH-wr2D-3fVgHUffNKYTirhjzL4YI7GKWu_4UlNeKnqXLWwVB-Vm_BFRXQqBP-iJ0z-raxZQvRoEjr_gkF_nc3SATX70U0XCzVDFfFFW5vxVqvJuGPmUNe_xXiHB2XsHHRZTC2f1nytCt1WjRC1ZJWQxalVrJa1PjBq-CR1NTZsPQjOG6lkxWXTFKYlRoJJYkwKIWS5HoaG1Gqs1lxK1TSwYvqsjC2XNvThWJgYZ91WYrVaU2HVoG1cBgnRoMZn7Sbg3WdZA-VIgWgMKp7yl-iL0Gaam2E-xtzZJqb4D3EyyS4z6VXWIHr8v1qlmINtT3le5DPaAe2OJp3moRz9GWi3zLi35eZL8H9mftotYUag3TXSS0t_BQAA__8yvHZu">