[llvm] [AArch64] Avoid overflow when using shl lower mul (PR #97148)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 03:13:23 PDT 2024


DianQK wrote:

> Thanks for looking into this. Could we change it to a check for shift amount > bitwidth? It would feel a little more reliable than checking if the result was folded to undef.

I guess I should use `getValueSizeInBits`. I also added a test case that just doesn't overflow.

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


More information about the llvm-commits mailing list