[llvm] [IR] Don't skip `catchswitch` when calling `BB::getFirstNonPHIOrDbgOrAlloca()` (PR #136056)

Tyler Lanphear via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 18:53:01 PDT 2025


tylanphear wrote:

@majnemer I see. I'm not overly familiar with `catchswitch` and friends, so it wasn't immediately clear that it should be considered a pseudo instruction. Its semantics actually seem a bit strange, and it looks like we have to have some special logic elsewhere in SLPVectorizer to handle its presence (i.e. [SLPVectorizer.cpp:9708](https://github.com/llvm/llvm-project/blob/9bd0c8726a5e3fd4f76e84692bd920dfca7a8d7f/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp#L9708))

I think it's possible to make the modification to `CheckForNonVecCallsInSameBlock` as you describe, though it seems non-trivial to do so, and I'm not sure if that's the right approach. Perhaps @alexey-bataev would have some opinion?

https://github.com/llvm/llvm-project/pull/136056


More information about the llvm-commits mailing list