From d89d4bccffbd23bea821af7fd09201f4e9abc546 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 22 Sep 2015 04:17:45 +0000 Subject: [PATCH] AMDGPU: Remove unnecessary check If the instruction doesn't have enough operands, it either shouldn't be marked as isCommutable or is malformed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248242 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/SIInstrInfo.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Target/AMDGPU/SIInstrInfo.cpp b/lib/Target/AMDGPU/SIInstrInfo.cpp index f013a1ee981..c7218dedddc 100644 --- a/lib/Target/AMDGPU/SIInstrInfo.cpp +++ b/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -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; -- 2.34.1