[llvm] [CGData][GlobalIsel][Legalizer][DAG][MC][AsmParser][X86][AMX] Use `std::move` to avoid copy (PR #118068)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 23:02:23 PST 2024


================
@@ -6824,7 +6824,7 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL,
             continue;
           }
           APInt Val = cast<ConstantSDNode>(Op)->getAPIntValue();
----------------
topperc wrote:

Can we change the preceding line to `const APInt &Val` instead? `getAPIntVal` returns a reference

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


More information about the llvm-commits mailing list