[PATCH] D63456: AMDGPU: Remove unnecessary check for virtual register

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 13:36:28 PDT 2019


arsenm created this revision.
arsenm added a reviewer: rampitec.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.

The copy was found by searching the uses of a virtual register, so
it's already known to be virtual.


https://reviews.llvm.org/D63456

Files:
  lib/Target/AMDGPU/SIFoldOperands.cpp


Index: lib/Target/AMDGPU/SIFoldOperands.cpp
===================================================================
--- lib/Target/AMDGPU/SIFoldOperands.cpp
+++ lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -503,7 +503,6 @@
   } else {
     if (UseMI->isCopy() && OpToFold.isReg() &&
         TargetRegisterInfo::isVirtualRegister(UseMI->getOperand(0).getReg()) &&
-        TargetRegisterInfo::isVirtualRegister(UseMI->getOperand(1).getReg()) &&
         TRI->isVGPR(*MRI, UseMI->getOperand(0).getReg()) &&
         TRI->isVGPR(*MRI, UseMI->getOperand(1).getReg()) &&
         !UseMI->getOperand(1).getSubReg()) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63456.205168.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190617/78fab039/attachment.bin>


More information about the llvm-commits mailing list