projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92716a4
)
[AMDGPU] Use llvm::bit_cast (NFC)
author
Kazu Hirata
<kazu@google.com>
Mon, 13 Feb 2023 05:59:14 +0000
(21:59 -0800)
committer
Kazu 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
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp
b/llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp
index
f77ed1f
..
22d0594
100644
(file)
--- a/
llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp
+++ b/
llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp
@@
-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);