<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/131537>131537</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm] X86 backend ignores prefer-vector-width=256 and generates vmovaps with zmm registers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:X86
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ezhulenev
</td>
</tr>
</table>
<pre>
Godbolt: https://godbolt.org/z/sx6bjjYYK
Function attribute is ignored and in the end LLVM generates avx512 movs. I'm still debugging this, but it crashes at run time because pointers are not 64 byte aligned, and I'm not sure how LLVM decide to use avx512 aligned movs
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckk9vnDAQxT-NuYx2BQOG5cBh24iqanqtkqONJ-DU2Ct7TP58-ordlSL1hIT93rx5P6uU7OyJBiG_CflQqMxLiAN9LtmRp63QwXwMP4LRwbGoz7AwX5KozwJHgeN8OziGOAscPwWO6b3Vr6_Pz79EeRblecx-Yhs8KOZodWYCm8DOPkQyoLwB64EXAvIGHh___IaZPEXFlEBt77JCWMOWjvBTYLdCYuscGNJ5nq2fgRebBH4HnRkswxRVWnYlQ8we2K4EmiaVE8ElWM8UE6hI4AND24D-YALl9gbMbrPnuQ3aL6QcCZbwdstlaLKGgAPsbvdsd-01Y2GG2vR1rwoaqq7BSqLs-mIZpMJGS6ymspcv1FJpqGnavtOt6XAqVWEHLFGWddVWfdVWp-NUddo0dd80fYlNexJNSauy7ujctu5lFzalTENVV7LuCqc0uXRFiKjV9Je8EfX56dQKxJ1qHHbhQec5iaZ0NnH6smLL7sp__yPkAzydWri73EkluER6oXjYaOIQD2_W8CLqB5TttbMvZtsaNnVJ8GZ5gc91hUizTXvvRY5u-O_1WF6yPk5hFThep98-h0sMrzSxwPG6ZxI43lfdBvwXAAD___ge41c">