Open pinskia opened 9 months ago
@llvm/issue-subscribers-backend-aarch64
Author: Andrew Pinski (pinskia)
Thanks for the bug report. This is because we widen all small integer vectors in DAG. It can make sense in some cases, but leads to worse performance in others. I'm hoping that we can at least make global-isel pick the better size.
Take:
Right now aarch64 produces:
But it could just use add directly without an extra truncate at the end like:
Reductions, multiply, popcount, compares and many more have a similar issue of wanting to extend to half-word and then truncating at the end. Instead of treating the other 4 entries in the vector as not needed. I found this while implmenting this similar thing in the GCC backend and I thought I would file this.