https://github.com/jayfoad commented: "mul24 x, (add y, 1) -> add (mul24 x, y), x" does not seem safe at all. You know that y+1 is a 24-bit value, but that does not guarantee that y is a 24-bit value. https://github.com/llvm/llvm-project/pull/79110