[llvm] 6368152 - [AMDGPU] SIShrinkInstructions: remove redundant check
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 06:50:13 PST 2021
Author: Jay Foad
Date: 2021-12-13T14:46:40Z
New Revision: 63681527ee978e703c6d1da0272f323c68387264
URL: https://github.com/llvm/llvm-project/commit/63681527ee978e703c6d1da0272f323c68387264
DIFF: https://github.com/llvm/llvm-project/commit/63681527ee978e703c6d1da0272f323c68387264.diff
LOG: [AMDGPU] SIShrinkInstructions: remove redundant check
canShrink already calls hasVALU32BitEncoding, so there is no need
to call it again here.
Added:
Modified:
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
index 3a372d4519fb..774e2b3d218d 100644
--- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -731,11 +731,6 @@ bool SIShrinkInstructions::runOnMachineFunction(MachineFunction &MF) {
continue;
}
- // getVOPe32 could be -1 here if we started with an instruction that had
- // a 32-bit encoding and then commuted it to an instruction that did not.
- if (!TII->hasVALU32BitEncoding(MI.getOpcode()))
- continue;
-
int Op32 = AMDGPU::getVOPe32(MI.getOpcode());
if (TII->isVOPC(Op32)) {
More information about the llvm-commits
mailing list