diff options
Diffstat (limited to 'llvm/lib/Target/R600/SIShrinkInstructions.cpp')
-rw-r--r-- | llvm/lib/Target/R600/SIShrinkInstructions.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Target/R600/SIShrinkInstructions.cpp b/llvm/lib/Target/R600/SIShrinkInstructions.cpp index e97f9344187..f91d1177bba 100644 --- a/llvm/lib/Target/R600/SIShrinkInstructions.cpp +++ b/llvm/lib/Target/R600/SIShrinkInstructions.cpp @@ -130,7 +130,7 @@ static void foldImmediates(MachineInstr &MI, const SIInstrInfo *TII, // Only one literal constant is allowed per instruction, so if src0 is a // literal constant then we can't do any folding. - if ((Src0->isImm() || Src0->isFPImm()) && TII->isLiteralConstant(*Src0)) + if (Src0->isImm() && TII->isLiteralConstant(*Src0)) return; @@ -151,12 +151,6 @@ static void foldImmediates(MachineInstr &MI, const SIInstrInfo *TII, if (MovSrc.isImm() && isUInt<32>(MovSrc.getImm())) { Src0->ChangeToImmediate(MovSrc.getImm()); ConstantFolded = true; - } else if (MovSrc.isFPImm()) { - const ConstantFP *CFP = MovSrc.getFPImm(); - if (&CFP->getValueAPF().getSemantics() == &APFloat::IEEEsingle) { - Src0->ChangeToFPImmediate(CFP); - ConstantFolded = true; - } } if (ConstantFolded) { if (MRI.use_empty(Reg)) @@ -193,7 +187,6 @@ bool SIShrinkInstructions::runOnMachineFunction(MachineFunction &MF) { if (MI.getOpcode() == AMDGPU::S_MOV_B32) { const MachineOperand &Src = MI.getOperand(1); - // TODO: Handle FPImm? if (Src.isImm()) { if (isInt<16>(Src.getImm()) && !TII->isInlineConstant(Src)) MI.setDesc(TII->get(AMDGPU::S_MOVK_I32)); |