[VectorUtils] Teach findScalarElement to return splat value.
If the vector is a splat of some scalar value, findScalarElement() can simply return the scalar value if it knows the requested lane is in the vector. This is only needed for scalable vectors, because the InsertElement/ShuffleVector case is already handled explicitly for the fixed-width case. This helps to recognize an InstCombine fold like: extractelt(bitcast(splat(%v))) -> bitcast(%v) Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D107254
Loading
Please register or sign in to comment