[llvm-commits] [llvm] r103407 - /llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp

Bob Wilson bob.wilson at apple.com
Mon May 10 10:42:49 PDT 2010


I forgot to mention that I was unable to get a testcase to commit for this.  I attached a reduced bitcode file to pr7096, but the problem is masked if I convert that file to a .ll file.  Apparently it depends on some use-list ordering to expose the problem.

On May 10, 2010, at 10:14 AM, Bob Wilson wrote:

> Author: bwilson
> Date: Mon May 10 12:14:26 2010
> New Revision: 103407
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=103407&view=rev
> Log:
> Fix PR7096.  When a block containing multiple defs is tail duplicated, the
> SSAUpdater for the value from the first def may see uses of undefined values,
> because the later defs will not have been updated yet.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp?rev=103407&r1=103406&r2=103407&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineSSAUpdater.cpp Mon May 10 12:14:26 2010
> @@ -329,7 +329,7 @@
>   /// InstrIsPHI - Check if an instruction is a PHI.
>   ///
>   static MachineInstr *InstrIsPHI(MachineInstr *I) {
> -    if (I->isPHI())
> +    if (I && I->isPHI())
>       return I;
>     return 0;
>   }
> 
> 
> _______________________________________________
> 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