[llvm] [TARGETS-PARSER] Added const reference for params with size >= 16 bytes (PR #125083)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 08:32:10 PST 2025
================
@@ -1822,7 +1822,7 @@ void NVPTXAsmPrinter::printFPConstant(const ConstantFP *Fp, raw_ostream &O) {
} else
llvm_unreachable("unsupported fp type");
- APInt API = APF.bitcastToAPInt();
+ const APInt &API = APF.bitcastToAPInt();
----------------
topperc wrote:
bitcastToAPInt returns a new APInt not a reference. So this creates a reference to a temporary object which works but seems like an uneccessary change.
https://github.com/llvm/llvm-project/pull/125083
More information about the llvm-commits
mailing list