diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-10 19:33:38 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-10 19:33:38 +0000 |
commit | fda531820484369b48e657abbbeaa969d4a94002 (patch) | |
tree | 37fbef442bd4d0bc015031734f69cef843c96be7 /llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | |
parent | a46241909a016d137a9864d2b67adc6acb56075c (diff) | |
download | bcm5719-llvm-fda531820484369b48e657abbbeaa969d4a94002.tar.gz bcm5719-llvm-fda531820484369b48e657abbbeaa969d4a94002.zip |
AMDGPU: Remove unnecessary check for constant operands
An instruction that has an immediate operand can't reach
this point. This is only called for a freshly shrunk instruction,
which prevously couldn't have had a literal constant operand.
This was also not conservative enough since it woudl also have
had to filter other constant-like inputs like frame indexes.
llvm-svn: 307574
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp index 6bff2c5fb79..327e745dee1 100644 --- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp +++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp @@ -138,11 +138,6 @@ static void foldImmediates(MachineInstr &MI, const SIInstrInfo *TII, int Src0Idx = AMDGPU::getNamedOperandIdx(MI.getOpcode(), AMDGPU::OpName::src0); - // Only one literal constant is allowed per instruction, so if src0 is a - // literal constant then we can't do any folding. - if (TII->isLiteralConstant(MI, Src0Idx)) - return; - // Try to fold Src0 MachineOperand &Src0 = MI.getOperand(Src0Idx); if (Src0.isReg() && MRI.hasOneUse(Src0.getReg())) { |