search for: loopbody1

Displaying 1 result from an estimated 1 matches for "loopbody1".

Did you mean: loopbody
2011 Jun 16
1
[LLVMdev] Confusion about excessive reads in the PowerPC assembly generated by LLVM
...- - - - - - - - - - - - - - - - As an example of what I am talking about, I contrived a test case with 8 live variables between basic blocks: #include <stdio.h> main() { int s,t,u,v,w,x,y,z; for (z=0; z<200; z++) s += ((((t*z+u)*z+v)*z+w)*z+x)*z+y; // loopbody1 for (z=10; z<20; z++) s += ((((t*z-u)*z-v)*z-w)*z-x)*z-y; // loopbody2 } Now, the assembly that is produced has 21 loads, which indicates no effort to reuse any data. In particular, the two basic blocks that correspond to loopbody1 and to loopbody2 are identical (except that the adds...