[llvm-commits] [llvm] r88881 - /llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp

Evan Cheng evan.cheng at apple.com
Sun Nov 15 20:03:25 PST 2009


Thanks Lang. Please add test case for this and r88880.

Evan

On Nov 15, 2009, at 6:07 PM, Lang Hames wrote:

> Author: lhames
> Date: Sun Nov 15 20:07:31 2009
> New Revision: 88881
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=88881&view=rev
> Log:
> Fixes the bug exposed by Anton's test case in PR 5495:
> Make sure when ProcessImplicitDefs removes a copy which kills its source reg that it
> removes the copy from said reg's Kills list.
> 
> 
> Modified:
>    llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp?rev=88881&r1=88880&r2=88881&view=diff
> 
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp Sun Nov 15 20:07:31 2009
> @@ -209,6 +209,10 @@
>         unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
>         if (tii_->isMoveInstr(*RMI, SrcReg, DstReg, SrcSubReg, DstSubReg) &&
>             Reg == SrcReg) {
> +          if (RMO.isKill()) {
> +            LiveVariables::VarInfo& vi = lv_->getVarInfo(Reg);
> +            vi.removeKill(RMI);
> +          }
>           RMI->setDesc(tii_->get(TargetInstrInfo::IMPLICIT_DEF));
>           for (int j = RMI->getNumOperands() - 1, ee = 0; j > ee; --j)
>             RMI->RemoveOperand(j);
> 
> 
> _______________________________________________
> 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