[llvm] r211510 - Use helper function
Matt Arsenault
Matthew.Arsenault at amd.com
Mon Jun 23 11:00:24 PDT 2014
Author: arsenm
Date: Mon Jun 23 13:00:24 2014
New Revision: 211510
URL: http://llvm.org/viewvc/llvm-project?rev=211510&view=rev
Log:
Use helper function
Modified:
llvm/trunk/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
Modified: llvm/trunk/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp?rev=211510&r1=211509&r2=211510&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp Mon Jun 23 13:00:24 2014
@@ -216,13 +216,8 @@ void AMDGPUInstPrinter::printClamp(const
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,
More information about the llvm-commits
mailing list