[llvm-commits] [llvm] r122586 - /llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Bill Wendling wendling at apple.com
Tue Dec 28 18:15:19 PST 2010


On Dec 27, 2010, at 2:08 PM, Cameron Zwarich wrote:

> Author: zwarich
> Date: Mon Dec 27 16:08:42 2010
> New Revision: 122586
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=122586&view=rev
> Log:
> Change an assertion to assert what the code actually relies upon.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp?rev=122586&r1=122585&r2=122586&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
> +++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Mon Dec 27 16:08:42 2010
> @@ -283,7 +283,7 @@
>     LiveInterval& DestLI = LI->getInterval(DestReg);
>     LiveInterval& NewLI = LI->getInterval(NewReg);
> 
> -    assert(DestLI.containsOneValue());
> +    assert(DestLI.ranges.size() == 1);

Could you add a string saying why it should be 1? Something like:

	assert(DestLI.ranges.size() == 1 && "One is the loneliest number!");

-bw





More information about the llvm-commits mailing list