<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/149285>149285</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[RISCV] canCreateUndefOrPoisonForTargetNode - can ROLW/RORW + SLLW/SRAW/SRLW create undef/poison?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:RISC-V
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RKSimon
</td>
</tr>
</table>
<pre>
AFAICT the RISCV spec states the rotate/shift amounts are always `amt & 31` modulo so there are no out of bound shift amounts that can create poison.
We already say ISD::ROTL/ROTR can't create undef/poison for the same reason, so RISCISD::ROLW/RORW should be OK, but its whether everyone is happy to handle SLLW/SRAW/SRLW similarly.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxskk9vozwQxj-NuYwSgfmXHDjQVEhRozevSLY5j_EkeNdgZJtWfPuVaVfblXoahGZ-nueZB51Tj5GoYvkTy58jnH1vbNW-XNRgxkgYuVR1Ux8PV_A9QXu8HF7BTdSB8-jJrX-tCd-MN65Xdw84mHn0DtASoH7HxQErYhw8MF5AmrAihsHIWRtwJgBCnyUYDZjZg7mDMPMo4V-a79FDhyN0ltATTEY5M25ZXLO4voWXLKFcwOECx8szS2uW1u35emK8ac_XNswyXvo_8_Mo6c5488GBu7GrFocDgSV0ZmT8EBYMmr8AT7cV2N7A9WbWEgTB-SX0itmD8g7eewqigN7ILmYkUA56nKYFvIEeR6kJLqeVc2nrj3K6gVOD0mj1so1klcp9useIqqTMeZnHRZ5FfSVoV2a0z3Z3KbNuh_sUd7mIy0RgkYg0jlTFY57HZVImSRLn2VYUvMxQZknGi5wXxLKYBlR6q_XbsDX2ESnnZqqSbM93eaRRkHZrGDgX2P2iUQbVx8th88o4DxGxVZjdiPnhWBZr5bz7S_PK6zVMa1JY_hxsP6yO_wiGn-3_q9-NsVe0D_L_GUmwWQ_71VvGn77z6NvbsbSJZqur3vvJhTPxhvHmoXw_i21nBsabsN9n2UzW_KTOM96s0h3jzaf6t4r_DgAA__-ipfvX">