https://github.com/arsenm requested changes to this pull request. You're probably better off doing this in a selection pattern. The 24-bit cases are better off with the multiply, and SALU vs. VALU matters too https://github.com/llvm/llvm-project/pull/71035