[ScalarizeMaskedMemIntrin] Handle the case where the mask is an all zero vector.

This shouldn't really happen in practice I hope, but we tried to handle other constant cases. We missed this one because we checked for ConstantVector without realizing that zero becomes ConstantAggregateZero instead.

So instead just check for Constant and use getAggregateElement which will do the dirty work for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343270 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed