[PATCH] D19337: [Tail duplication] Handle source registers with subregisters
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 08:32:39 PDT 2016
kparzysz added inline comments.
================
Comment at: lib/CodeGen/TailDuplicator.cpp:366
@@ -363,1 +365,3 @@
+ if (VI->second.SubReg == 0)
+ MRI->constrainRegClass(VI->second.Reg, MRI->getRegClass(Reg));
}
----------------
qcolombet wrote:
> Why do you check for the subreg here?
> If you believe the adding constraints will not work, you should check the result of constrainRegClass and act accordingly.
This is because we are doing a replacement
```
Reg -> VI.Reg:VI.SubReg
```
If SubReg is present, then VI.Reg belongs to a class where its sub-registers are compatible with Reg, but VI.Reg itself does not have to be. Actually, I think that the existing code is broken.
Repository:
rL LLVM
http://reviews.llvm.org/D19337
More information about the llvm-commits
mailing list