[llvm] [LV] Fix a crash on SELECT masks with a one element vector. (PR #83332)

Cameron McInally via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 12:15:31 PST 2024


mcinally wrote:

> IIUC this would be the only case where we could generate vectors with a single element. does it make sense to use active-lane-mask in this case? Seems like a simple compare would suffice in this case. If not, could the active-lane-mask recipes set the scalar-per-part instead of the vector value?

Created PR83902 for this. That patch replaces active lane masks with ICMPs when the mask part is a scalar.

There may be a better way to achieve this by replacing the ActiveLaneMask earlier. But, I have limited intuition into LoopVectorize and I was failing to find the VF to trigger the replacement. (I've also exceeded my allotted time to fix this ICE.)

Apologies if my new PR was supposed to update this PR. I don't use GitHub often.

https://github.com/llvm/llvm-project/pull/83332


More information about the llvm-commits mailing list