[llvm] [InstCombine] Add additional known bits info for self multiply (PR #151202)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 2 10:09:03 PDT 2025


dtcxzyw wrote:

We can re-test this patch after it is generalized to handle all bitwidths.
IIRC if `X` has exactly N trailing zeros (i.e., N-th bit is 1), the (2N+1)-th bit and (2N+2)-th bit of `X * X` must be zero.
https://alive2.llvm.org/ce/z/E__ERn

Can we relax the constraint further? Is it enough for the original motivating issue?


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


More information about the llvm-commits mailing list