Skip to content

Commit 0c03f09

Browse files
committed
AMDGPU: Remove dead code for printing DFP immediates
Nothing in the backend uses these, so there's no reason to support printing them.
1 parent 3576f05 commit 0c03f09

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -792,22 +792,6 @@ void AMDGPUInstPrinter::printRegularOperand(const MCInst *MI, unsigned OpNo,
792792
// custom printer.
793793
llvm_unreachable("unexpected immediate operand type");
794794
}
795-
} else if (Op.isDFPImm()) {
796-
double Value = bit_cast<double>(Op.getDFPImm());
797-
// We special case 0.0 because otherwise it will be printed as an integer.
798-
if (Value == 0.0)
799-
O << "0.0";
800-
else {
801-
const MCInstrDesc &Desc = MII.get(MI->getOpcode());
802-
int RCID = Desc.operands()[OpNo].RegClass;
803-
unsigned RCBits = AMDGPU::getRegBitWidth(MRI.getRegClass(RCID));
804-
if (RCBits == 32)
805-
printImmediate32(llvm::bit_cast<uint32_t>((float)Value), STI, O);
806-
else if (RCBits == 64)
807-
printImmediate64(llvm::bit_cast<uint64_t>(Value), STI, O, true);
808-
else
809-
llvm_unreachable("Invalid register class size");
810-
}
811795
} else if (Op.isExpr()) {
812796
const MCExpr *Exp = Op.getExpr();
813797
MAI.printExpr(O, *Exp);

0 commit comments

Comments
 (0)