[PATCH] D158610: [NFC] Remove dead assignments

Martin Wehking via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 06:19:25 PDT 2023


MartinWehking created this revision.
MartinWehking added a reviewer: arsenm.
Herald added subscribers: foad, kerbowa, hiraditya, jvesely.
Herald added a project: All.
MartinWehking requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Dest is never used after creating the type making these assignments dead


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158610

Files:
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp


Index: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -6219,13 +6219,11 @@
   // Handle needing to s.buffer.load() a p8 value.
   if (hasBufferRsrcWorkaround(Ty)) {
     Ty = castBufferRsrcFromV4I32(MI, B, *B.getMRI(), 0);
-    Dst = MI.getOperand(0).getReg();
     B.setInsertPt(B.getMBB(), MI);
   }
   if (shouldBitcastLoadStoreType(ST, Ty, LLT::scalar(Size))) {
     Ty = getBitcastRegisterType(Ty);
     Helper.bitcastDst(MI, Ty, 0);
-    Dst = MI.getOperand(0).getReg();
     B.setInsertPt(B.getMBB(), MI);
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158610.552688.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230823/55871035/attachment.bin>


More information about the llvm-commits mailing list