[LLVMbugs] [Bug 1135] NEW: Change "+" to "|" may cause problem in loop dependence analysis

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 26 17:29:50 PST 2007


           Summary: Change "+" to "|" may cause problem in loop dependence
           Product: new-bugs
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: wjiang at cs.ucla.edu

This is actually not a bug, but it may bring problem to further optimizations. 
The TOT llvm now can change the addition(+) to or(|) if one operation is a 
constant and satisfies some condition ( around InstCombiner.cpp: 1107) . But if 
somebody want to analyze the dependence inside one loop (most of the dependency 
techniques don't work on bit operations), it may cause some problems. 
For exmaple: 
    for ( i=0; i<N; i++) {
        x = 4*i;
        a [x ] = a[x+1] + ...
After llvm optimization x+1 is changed to :
    x = shl i, 2
    tmp1 = or x, 1

Can you provide an option to disable this kind of operation , or can you 
recover it back to addition in ScalarEvolution? Thanks.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list