[llvm] [APInt] Use a std::move() to avoid a copy in the loop in multiplicativeInverse. (PR #87655)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 21:13:35 PDT 2024


topperc wrote:

> > operator*= for APInt still does a new allocation doesn't it?
> 
> Umm... yes, I guess. Maybe we should consider adding `void APInt::mla(const APInt &a, const APInt &b)`, which wouldn't require an allocation.

I guess you mean using the addend as the destination buffer for tcMultiply?

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


More information about the llvm-commits mailing list