[llvm] [AMDGPU] Fix mul combine for MUL24 (PR #79110)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 02:50:37 PST 2024
jayfoad wrote:
> > "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.
>
> Ah indeed, good catch. Should the combine just be removed?
I guess it's safe for a regular mul, so maybe move the "Skip if already mul24" up a bit?
https://github.com/llvm/llvm-project/pull/79110
More information about the llvm-commits
mailing list