<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/148680>148680</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DirectX] Update passes to report when it modifies input
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:DirectX
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
inbelic
</td>
</tr>
</table>
<pre>
There a two passes that fail when running with `DLLVM_ENABLE_EXPENSIVE_CHECKS`. Namely:
- Scalarize vector operations
- DXIL Resource Access
They fail with the slight variations of the following:
```
Pass modifies its input and doesn't report it: DXIL Resource Access
Pass modifies its input and doesn't report it
UNREACHABLE executed at llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1405!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llvm-project/build/bin/opt -S -dxil-resource-access llvm-project/llvm/test/CodeGen/DirectX/ResourceAccess/load_typedbuffer.ll
1. Running pass 'Function Pass Manager' on module 'llvm-project/llvm/test/CodeGen/DirectX/ResourceAccess/load_typedbuffer.ll'.
2. Running pass 'DXIL Resource Access' on function '@load_float4'
```
To reproduce, build main with `DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VN9v2zYQ_mvol4MFipIi50EPqm2twVwviNsibwFFnSSuFCnwR1Lvrx-o2Fm7rcA2YAYBgqZ4991333fcOTloxIoU70ixW_HgR2MrqVtUUqxa052rjyNaBA7-xcDMnUMHfuQeei4VvIyowQatpR7gRfoRyA3dHQ6fPzztj_W7w_5p_3i_P57uPu-ftu_3259P5IYmcOQTqjPJakLjWsNJcMWt_A3hGYU3FsyMlntptFvud493B3hAZ4IVCLUQ6Nzr248jni9YYno_Ijglh9HDM7fyNQSYfrnojVLmRerhLTO5oZdF63vuHEymk71EB9I7kHoOHrjuoDPoNGGlB4uzsR6kJ1n9I1j_NhKtPx0f9vX2fWQM8CuK4LED7kGp52k9W_MrCk9YE49xky1hzd0DYc0BBy7OMeEHrvmANhHzTLI6zWlBWBrBHPb1aQ8utJP0wKENwzW1NzB6P7tIB2sIawbpx9AmwkzfJPsegnQuoCOsWaqRWqjQ4cKusNyN0HLxxVsuMCG0PnkuvkAXpvmVcZrA8ru3ZrB8Am6HMKH2EcGfa22DVF3cpSasMbOH9QnW3Vep1vbC-JovjP-AJY8unramw58wxthJi8I_EtZcW3bpGGuU4d2TP8_YtaHv0SZKEVqnCTxctB2VD4SVTdAiagqWHl84J6wEo2PHg8L41f8DiJWRU_ZXUH8rw1dM_RUvYSXJ6RK2V4b7PP7xvQGim0zUhjVdEEjYFpYmwMSl_ofuzna_HKPFV12VdbfZLV9hlZYFK9IsLzarsaIsF0XX3uR5S8tbTkVBs7JPSybaPkXWrmTFKCtomeZpmZbZJimzDEXOMibStGe3G5JTnLhUSaQ1MXZYLZqs0nxzs6ErxVtUbplojEU1ou5IVr9xzeKgs9XSojYMLrIinXd_hPPSq2UkXt8UO_g0d9zj2wA0VwstA1D6b9wenb4KVlX_3VqXSp4r9nsAAAD__8Of2Vg">