[InstCombine] reduce multi-use casts+masks
As noted in the code comment, we could generalize this: https://alive2.llvm.org/ce/z/N5m-eZ It saves an instruction even without a constant operand, but the 'and' is wider. We can do that as another step if it doesn't harm anything. I noticed that this missing pattern with a constant operand inhibited other transforms in a recent bug report, so this is enough to solve that case.
Loading
Please sign in to comment