https://github.com/nikic requested changes to this pull request. Please see https://llvm.org/docs/InstCombineContributorGuide.html#precommit-tests. All of your tests already fold without your patch: https://llvm.godbolt.org/z/ffs3MYGGT https://github.com/llvm/llvm-project/pull/171047