[llvm] r235673 - RegisterCoalescer: implicit phsreg uses are fine when rematerializing
Quentin Colombet
qcolombet at apple.com
Thu Apr 23 17:22:24 PDT 2015
> On Apr 23, 2015, at 5:01 PM, Matthias Braun <matze at braunis.de> wrote:
>
> Author: matze
> Date: Thu Apr 23 19:01:37 2015
> New Revision: 235673
>
> URL: http://llvm.org/viewvc/llvm-project?rev=235673&view=rev
> Log:
> RegisterCoalescer: implicit phsreg uses are fine when rematerializing
>
> The target hooks should have already checked them. This change is
> necessary to enable the remateriailzation on R600.
>
> Modified:
> llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
>
> Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=235673&r1=235672&r2=235673&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Thu Apr 23 19:01:37 2015
> @@ -963,8 +963,8 @@ bool RegisterCoalescer::reMaterializeTri
> for (unsigned i = NewMI->getDesc().getNumOperands(),
> e = NewMI->getNumOperands(); i != e; ++i) {
> MachineOperand &MO = NewMI->getOperand(i);
> - if (MO.isReg()) {
> - assert(MO.isDef() && MO.isImplicit() && MO.isDead() &&
> + if (MO.isReg() && MO.isDef()) {
> + assert(MO.isImplicit() && MO.isDead() &&
> TargetRegisterInfo::isPhysicalRegister(MO.getReg()));
Wait!
This is not good. The simple rematerialization shouldn’t create register uses.
What do you remat here?
Q.
> NewMIImplDefs.push_back(MO.getReg());
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list