[llvm-commits] [llvm] r74898 - /llvm/trunk/lib/CodeGen/PHIElimination.cpp

Evan Cheng evan.cheng at apple.com
Tue Jul 7 10:50:29 PDT 2009


This patch broke a whole bunch of tests. For example on Grawp-PIC:

New Test Failures:
test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll [DEJAGNU]
test/CodeGen/X86/2006-05-02-InstrSched2.ll [DEJAGNU]
test/CodeGen/X86/2008-05-21-CoalescerBug.ll for PR2343 [DEJAGNU]
test/CodeGen/X86/stack-color-with-reg-2.ll [DEJAGNU]
test/CodeGen/X86/twoaddr-pass-sink.ll [DEJAGNU]
Applications/oggenc/oggenc [LLC compile, ]
Benchmarks/ASCI_Purple/SMG2000/smg2000 [LLC compile, ]
Benchmarks/mafft/pairlocalalign [LLC compile, ]
Benchmarks/MallocBench/gs/gs [LLC compile, ]
Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode [LLC compile, ]
Benchmarks/MiBench/consumer-jpeg/consumer-jpeg [LLC compile, ]
Benchmarks/MiBench/consumer-lame/consumer-lame [LLC compile, ]
Benchmarks/Misc/whetstone [LLC compile, ]
Benchmarks/Ptrdist/yacr2/yacr2 [LLC compile, ]
Nurbs/nurbs [LLC compile, ]
SPEC/CFP2006/433.milc/433.milc [LLC compile, ]
SPEC/CINT2000/176.gcc/176.gcc [LLC compile, ]
SPEC/CINT2000/254.gap/254.gap [LLC compile, ]
SPEC/CINT2006/403.gcc/403.gcc [LLC compile, ]

I'll back it out for now. Sanjiv, please investigate. Thanks.

Evan

On Jul 7, 2009, at 1:04 AM, Sanjiv Gupta wrote:

> Author: sgupta
> Date: Tue Jul  7 03:04:51 2009
> New Revision: 74898
>
> URL: http://llvm.org/viewvc/llvm-project?rev=74898&view=rev
> Log:
> if the terminator is a branch depending upon the side effects of a
> previous cmp; a copy can not be inserted here if the copy insn also  
> has
> side effects. We don't have access to the attributes of copy insn  
> here;
> so just play safe by finding a safe locations for branch terminators.
>
> Modified:
>    llvm/trunk/lib/CodeGen/PHIElimination.cpp
>
> Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=74898&r1=74897&r2=74898&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original)
> +++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Tue Jul  7 03:04:51 2009
> @@ -169,9 +169,15 @@
>     return MBB.begin();
>
>   // If this basic block does not contain an invoke, then control  
> flow always
> -  // reaches the end of it, so place the copy there.  The logic  
> below works in
> -  // this case too, but is more expensive.
> -  if (!isa<InvokeInst>(MBB.getBasicBlock()->getTerminator()))
> +  // reaches the end of it, so place the copy there.
> +  // If the terminator is a branch depending upon the side effects  
> of a
> +  // previous cmp; a copy can not be inserted here if the copy insn  
> also
> +  // side effects. We don't have access to the attributes of copy  
> insn here;
> +  // so just play safe by finding a safe locations for branch  
> terminators.
> +  //
> +  // The logic below works in this case too, but is more expensive.
> +  const TerminatorInst *TermInst = MBB.getBasicBlock()- 
> >getTerminator();
> +  if (!(isa<InvokeInst>(TermInst) || isa<BranchInst>(TermInst)))
>     return MBB.getFirstTerminator();
>
>   // Discover any definition/uses in this basic block.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090707/6da76e8b/attachment.html>


More information about the llvm-commits mailing list