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

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 19:20:11 PDT 2025


majnemer wrote:

Another way to go would be to do something like:
```c++
      if (auto It = BB->getFirstNonPHIOrDbgOrAlloca();
          It != BB->end() && 
          !CheckForNonVecCallsInSameBlock(&*It,
                                          BB->getTerminator()))
        return Res;
```

This is consistent with the existing code as there are no call instructions and thus the condition is vacuously maintained.

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


More information about the llvm-commits mailing list