[all-commits] [llvm/llvm-project] 04f33a: [APInt] Use a std::move() to avoid a copy in the l...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Apr 8 20:38:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 04f33a3ac2e8ca96840606f812eaef974ff61c80
      https://github.com/llvm/llvm-project/commit/04f33a3ac2e8ca96840606f812eaef974ff61c80
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/lib/Support/APInt.cpp

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

This allows the subtract to reuse the storage of T. T will be assigned
over by the condition on the next iteration. I think assigning over a
moved from value should be ok.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list