<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/113192>113192</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DirectX] Handle named structs in DXILOpLowering in a generic way
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:DirectX
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bogner
</td>
</tr>
</table>
<pre>
In #109331 we need to replace an anonymous struct with a named `%dx.types.splitdouble` struct during lowering to DXIL ops, and there are a few other operations that need to undergo a similar transformation. We should add something in the DXIL.td representation of DXIL ops to say that an anonymous struct return type must be replaced with an exactly equivalent named one in this way so that the generic handling of lowering to DXIL ops from an intrinsic can be used in these cases.
Note: This should only apply to cases where the transformation is trivial. Operations like `BufferLoad` and `AnnotateHandle` use named structs but need to do more complicated transformations than simply naming a struct to get the data in the right format, so they should be explicitly out of scope here.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxslE2P2zgThH8NdWlEkCh_jA86OK9hvAEGm8sCm2tLbEncUGwt2RyP_v2Csj2DLHLwBwQ3q_qpojFGO3qiVu2_qv2lwCQTh7bj0VMoOjZr-82D0k1dnZqmhhuBJzIgDIEWhz0BekDPfp05RYgSUi9wszIBgseZDKhDpfTevJeyLhTLuDgrhlPnSB2q54RJwfoRHN9o-yIMlx_fXoGXqPT_AL0BmSgQYH7BQDfg_AB4oYBi2UeQCeXDXvKGwsiAEO1sHQaQgD4OHObt5yX8RRAnTs4AGgORZ5IpS1ufpTb5UkzeM1AkL9sY8PBhLMtEXO-6v8MQSFLwkPeGOUWBjp7YzIORB3rHXtwK9E-yb-jIy4Mbe7p7sRFuuELku1I2N5KnYHuY0BuXTfPwW3YwBJ6zivUSrI-2hx599pEimceqkaDHSLFU1UVV5_v7HyykmjP8meUfnNi7FXBZ3Jo1thm4balkT7_yBRtBgn2z6Er4_hmSsz8pV-JrGgYKr4wmtyDnqw7V2XsWFPp_XmurR4r0wHFnGqFLnyEbhpkDQc_z4myPkh__YmNrhc8dyK49zhkQPgMShpHuRA0KPqMPdpwE7mfk9m3kaX1i6AjoPevZnBsnyfRjzwtBhlEWpm3MqTlhQW191Kd9U1WHXTG1Q0VDV-NuZ5qXodPYYV8fG9ztm_qoDy9dYVtd6V1d6bo-VnW1K_VL15z2p0N_ejkcj8de7Sqa0brSube55DAWNsZEbV039UkXDjtycbvMWnfY_yRvVHO-2EC9_FBa5zse2jz8pUtjVLvK2Sjx8zix4rZ_g-fM_gL3NP4Tg_Vbyb4vr8_aWQ_4UcwbrkUKrp1Elqias9JXpa-jlSl1Zc-z0tes-fj4sgT-m3pR-rrtE5W-PlZ6a_W_AQAA__-EIZzG">