<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/120906>120906</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[X86][SDAG] llc hang with constant vector splats
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:X86,
llvm:hang,
llvm:SelectionDAG
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dtcxzyw
</td>
</tr>
</table>
<pre>
Reproducer: https://godbolt.org/z/PnsfYrfnf
```
; bin/llc test.ll -o -
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define i32 @test(ptr %p) {
entry:
store i32 564341309, ptr %p, align 4
%0 = load i32, ptr %p, align 4
%broadcast.splatinsert.1 = insertelement <4 x i32> zeroinitializer, i32 %0, i64 0
%broadcast.splat.1 = shufflevector <4 x i32> %broadcast.splatinsert.1, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer
%1 = icmp ugt <4 x i32> %broadcast.splat.1, splat (i32 -9)
%2 = zext <4 x i1> %1 to <4 x i8>
%3 = shl <4 x i8> splat (i8 11), %2
%4 = or <4 x i8> %3, splat (i8 11)
%bin.rdx = zext <4 x i8> %4 to <4 x i32>
%5 = tail call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %bin.rdx)
ret i32 %5
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEVE2T4yYQ_TXoQkkFDfrwQQfNeJ1rKnNJTikkIZksBhcgj8e_PgWWdma8yWyVS24-3uv3GmjhvZqNlC0qn1C5z8QSjta1Yxiut7fXrLfjW_uHPDs7LoN0iHX4GMLZI9YhOCA4zHbsrQ6FdTOCww3B4Xfjp7_cZCZEOlSR9Uc6xJ5wrwyCg9YDDtKHQmucW5wj0gXhZhnwKILQ4s0uASO2xwhA5ifEOpmfoSaIdQzSJw7p52GMKp4-ufoRUGgQ6yg0-dSQNTJpqtrgFc9f4jaAdx3BqbOWm4ZrU_1d8Xwx3419NblWZrnms1nuEES6UU7KSKwYYMRJtIagOQeHEZRnBDuM6idEOmmCe4uVIx32wbo7oqw445SRHYJn_A56xkKr2WAed8c5kuRoK8YI-2IzgrJ3VoyD8KHwZy2CMl66UNDEcB9ILU_SxDI_c3xNjOwbvklnlVFBCa1u0kXiZApKkuKKY7LpecixsvvjMk1aXuQQrHtg_39hkfyXSr7esKpaPQ6nM17mR3v_pToypxAjaKLZfIdgt9FBorvJ6zsVXZkoDvbHZIPYtw3D1kLoT6sfkjSY0pgjeoISNhxPuA9Va9ZM7LPGDb6dgzKFG68_C93g_KPQVIgNWiZQEErjQWi9XWCtL6fifoKFk_HhF9YVF56uXfNzSe8CNklOhu3SlPF51PuHRpCNLRt3bCcy2dKa8abhlPHs2PKel4JOdTlMteDAallTKEnTN6yuxollqgUCnAIArWjJWFHTAeg0jD2VlahlhTiRJ6F0kSxYN2fK-0W2FMiOVJkWvdQ-tTqAXgzfpRkR6_5sqviU4RkBRCBi3VGY-XHuRWo5BGXNvvstrpX7zLVxLe-X2ce6KR_8e-qggk59NfKXe1Q-vURkucexAcYM-FWFIx6s8UGYgNdHk07aZ4vT7UOvVeG49MVgT6mJXra__OzsP3IICA7JrkdwWB1fWvg3AAD__8n8rIw">