[LLVMdev] Is Loop Dependence Analysis Printing Correct Stats?

Caldarale, Charles R Chuck.Caldarale at unisys.com
Wed Jun 20 14:48:54 PDT 2012


> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Arnamoy Bhattacharyya
> Subject: [LLVMdev] Is Loop Dependence Analysis Printing Correct Stats?

>	for(i = 0; i < 4; i ++)
>	{
>		a[i] = a[i-1]+1;
>	}

> Am I doing anything wrong or the code seems buggy?

Your code is buggy.  The first time through the loop, you're referencing a[-1], which is undefined.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.





More information about the llvm-dev mailing list