[AMDGPU] Use llvm::bit_cast (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 13 Feb 2023 05:59:14 +0000 (21:59 -0800)
committerKazu Hirata <kazu@google.com>
Mon, 13 Feb 2023 05:59:14 +0000 (21:59 -0800)
AFAICT, this is the only place where we pass a 64-bit value into
BitsToFloat.

llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp

index f77ed1f..22d0594 100644 (file)
@@ -97,7 +97,7 @@ void R600InstPrinter::printLiteral(const MCInst *MI, unsigned OpNo,
   assert(Op.isImm() || Op.isExpr());
   if (Op.isImm()) {
     int64_t Imm = Op.getImm();
-    O << Imm << '(' << BitsToFloat(Imm) << ')';
+    O << Imm << '(' << llvm::bit_cast<float>(static_cast<uint32_t>(Imm)) << ')';
   }
   if (Op.isExpr()) {
     Op.getExpr()->print(O << '@', &MAI);