https://github.com/nikic approved this pull request. LGTM, with the note that there is a pre-existing bug in the code below, which incorrectly skips UndefValue rather than PoisonValue in constant vectors. https://github.com/llvm/llvm-project/pull/87990