Use helper function

llvm-svn: 211510
This commit is contained in:
Matt Arsenault 2014-06-23 18:00:24 +00:00
parent 236d9afd18
commit 762ef017db
1 changed files with 2 additions and 7 deletions

View File

@ -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,