[PATCH] D34130: [AMDGPU] Eliminate SGPR to VGPR copy when possible
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 11:30:00 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:182-187
+ unsigned DstReg = MI.getOperand(0).getReg();
+ unsigned SrcReg = Src.getReg();
+ if (!TargetRegisterInfo::isVirtualRegister(SrcReg) ||
+ !TargetRegisterInfo::isVirtualRegister(DstReg))
+ return false;
+
----------------
rampitec wrote:
> arsenm wrote:
> > This probably breaks if you have a copy that looks like a sub register extract
> The should not be a problem. I'm changing VGPR class to equivalent SGPR class, they support the same set of subregs.
I have added test for that.
Repository:
rL LLVM
https://reviews.llvm.org/D34130
More information about the llvm-commits
mailing list