https://github.com/arsenm commented: I still have the feeling this is beyond the scope of what the vectorizer should be doing. Attributor / functionattrs + instcombine should be dealing with this https://github.com/llvm/llvm-project/pull/145733