diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-06-23 18:00:24 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-06-23 18:00:24 +0000 |
commit | 261698fbd5fb38bc11d713ee6025c06d08048784 (patch) | |
tree | 86a35122731db97e75b0bf9e5d7b6b8e8fc21d18 /lib/Target/R600 | |
parent | 1f93cf49fcaac55a8ef771b70a2a0c259f3813a2 (diff) | |
download | llvm-261698fbd5fb38bc11d713ee6025c06d08048784.tar.gz llvm-261698fbd5fb38bc11d713ee6025c06d08048784.tar.bz2 llvm-261698fbd5fb38bc11d713ee6025c06d08048784.tar.xz |
Use helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600')
-rw-r--r-- | lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp b/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp index 11ae091021..a935f9e5e9 100644 --- a/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp +++ b/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, |