<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139011>139011</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DirectX] Validator fails with Instructions should not read uninitialized value.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
farzonl
</td>
</tr>
</table>
<pre>
In DML test like `NonzeroCoordinatesSingleLevel_256_b16c32_int_4.dat` and `QLinearConvDp4aCommonKS_3x1_ConvInt_s8s8_InputVec4.dat`
Many select instructions have parameters with undef as either the second or third argument causing a bad read.
we see about 38 of these errrors below are all instances with prefix with the number of times seen:
```llvm
x4: %35 = select i1 %34, i32 %28, i32 undef
x2: %42 = select i1 %41, i32 %25, i32 undef
x4 %48 = select i1 %47, i32 %43, i32 undef
x8: %70 = select i1 %69, i32 %44, i32 undef
x4: %71 = select i1 %70, i32 %45, i32 undef
x6: %79 = select i1 %78, i32 %30, i32 undef
x2: %92 = select i1 %91, i32 %29, i32 undef
x4: %93 = select i1 %92, i32 %29, i32 undef
x1: %1577 = select i1 %1396, i32 undef, i32 %1576
x1: %1571 = select i1 %1393, i32 undef, i32 %1570
x1: %1572 = select i1 %1393, i32 %1569, i32 undef
x1: %1577 = select i1 %1396, i32 undef, i32 %1576
```
Will be interesting to see if this has something to do with how we legalized freeze: https://github.com/llvm/llvm-project/pull/136043
Maybe freeze emulation was needed after all: https://github.com/llvm/llvm-project/pull/136043/commits/27dca03e052e655423aa8b1de2bad816ee7bdbd4
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0lVuL4zYUxz-N8nJo0MXXBz9MJwSGzhbKwrZv4dg6jtXKUpDkZGY-fbGT2c1usguFLhhsXX7_c5HPEcZo9o6oYfmvLN-scEqDD02P4c07u2q9fm2eHGw-PAMkigms-YeAFfx3794o-EfvgzYOE8WPxu0tPdOR7E7mxa4VRafk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