AMDGPU: Remove unnecessary check
[oota-llvm.git] / lib / Target / AMDGPU / SIInstrInfo.cpp
index f013a1ee981d88410f391185e06b7c7c43250576..c7218dedddcc8dc75371bd5c17c97d502a9d2e13 100644 (file)
@@ -784,10 +784,6 @@ bool SIInstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
 
 MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
                                               bool NewMI) const {
-
-  if (MI->getNumOperands() < 3)
-    return nullptr;
-
   int CommutedOpcode = commuteOpcode(*MI);
   if (CommutedOpcode == -1)
     return nullptr;