[llvm] [AMDGPU] Fix mul combine for MUL24 (PR #79110)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 23:00:38 PST 2024


Pierre-vh 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? (cc @arsenm - I think you wrote this one)

https://github.com/llvm/llvm-project/pull/79110


More information about the llvm-commits mailing list