[llvm] [ADT] Add implementations for mulhs and mulhu to APInt (PR #84609)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 9 04:24:31 PST 2024


jayfoad wrote:

> @jayfoad, regarding changes in `KnownBitsTest.cpp`, is it expected to change `return KnownBits::mulhs(Known1, Known2);` with `return APIntOps::mulhs(Known1, Known2)`?

No, it's this expression in the mulhs test (and similar for mulhu) that can be replaced with a call to the new APInt method: `(N1.sext(2 * Bits) * N2.sext(2 * Bits)).extractBits(Bits, Bits)`

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


More information about the llvm-commits mailing list