https://github.com/XChy requested changes to this pull request. The issue is a specifc case, you need to provide a generalized pattern at least. See also https://llvm.org/docs/InstCombineContributorGuide.html#generalization https://github.com/llvm/llvm-project/pull/87157