[AMDGPU] Remove dead code from shrinkScalarLogicOp
authorJay Foad <jay.foad@amd.com>
Wed, 9 Feb 2022 17:05:19 +0000 (17:05 +0000)
committerJay Foad <jay.foad@amd.com>
Wed, 9 Feb 2022 17:07:12 +0000 (17:07 +0000)
It looks like this code has been dead since shrinkScalarLogicOp
was introduced in svn r348601.

llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp

index c8f1daf..a15686c 100644 (file)
@@ -354,12 +354,6 @@ static bool shrinkScalarLogicOp(const GCNSubtarget &ST,
     llvm_unreachable("unexpected opcode");
   }
 
-  if ((Opc == AMDGPU::S_ANDN2_B32 || Opc == AMDGPU::S_ORN2_B32) &&
-      SrcImm == Src0) {
-    if (!TII->commuteInstruction(MI, false, 1, 2))
-      NewImm = 0;
-  }
-
   if (NewImm != 0) {
     if (Dest->getReg().isVirtual() && SrcReg->isReg()) {
       MRI.setRegAllocationHint(Dest->getReg(), 0, SrcReg->getReg());