https://github.com/nikic commented: This whole code looks unnecessarily complicated. Can we just handle everything via getAggregateElement? Plus a getSplatValue() check if we want to retain the fast path. https://github.com/llvm/llvm-project/pull/182538