[PATCH] D28879: [AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 16:19:37 PST 2017


rampitec created this revision.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl.

This instruction is missing from LiveIntervals.
I'm not aware of any problems because of this though.


Repository:
  rL LLVM

https://reviews.llvm.org/D28879

Files:
  lib/Target/AMDGPU/SILowerControlFlow.cpp


Index: lib/Target/AMDGPU/SILowerControlFlow.cpp
===================================================================
--- lib/Target/AMDGPU/SILowerControlFlow.cpp
+++ lib/Target/AMDGPU/SILowerControlFlow.cpp
@@ -219,7 +219,8 @@
   // tied. In order to correctly tie the registers, split this into a copy of
   // the src like it does.
   unsigned CopyReg = MRI->createVirtualRegister(&AMDGPU::SReg_64RegClass);
-  BuildMI(MBB, Start, DL, TII->get(AMDGPU::COPY), CopyReg)
+  MachineInstr *CopyExec =
+    BuildMI(MBB, Start, DL, TII->get(AMDGPU::COPY), CopyReg)
       .add(MI.getOperand(1)); // Saved EXEC
 
   // This must be inserted before phis and any spill code inserted before the
@@ -261,6 +262,7 @@
   LIS->RemoveMachineInstrFromMaps(MI);
   MI.eraseFromParent();
 
+  LIS->InsertMachineInstrInMaps(*CopyExec);
   LIS->InsertMachineInstrInMaps(*OrSaveExec);
 
   LIS->InsertMachineInstrInMaps(*Xor);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28879.84906.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170119/843d9649/attachment.bin>


More information about the llvm-commits mailing list