summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-06-23 18:00:24 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-06-23 18:00:24 +0000
commit762ef017db3f0f2fcfb6cec631c9dc604cb4529e (patch)
tree2912708833d664abec165157f505713c5a7d72ea /llvm
parent236d9afd187eab505b38f21129815c59fa29d420 (diff)
downloadbcm5719-llvm-762ef017db3f0f2fcfb6cec631c9dc604cb4529e.tar.gz
bcm5719-llvm-762ef017db3f0f2fcfb6cec631c9dc604cb4529e.zip
Use helper function
llvm-svn: 211510
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
index 11ae0910218..a935f9e5e9c 100644
--- a/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
@@ -216,13 +216,8 @@ void AMDGPUInstPrinter::printClamp(const MCInst *MI, unsigned OpNo,
void AMDGPUInstPrinter::printLiteral(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
- union Literal {
- float f;
- int32_t i;
- } L;
-
- L.i = MI->getOperand(OpNo).getImm();
- O << L.i << "(" << L.f << ")";
+ int32_t Imm = MI->getOperand(OpNo).getImm();
+ O << Imm << '(' << BitsToFloat(Imm) << ')';
}
void AMDGPUInstPrinter::printLast(const MCInst *MI, unsigned OpNo,
OpenPOWER on IntegriCloud