[LLVMbugs] [Bug 16235] New: ScalarEvolution::ComputeExitLimitFromICmp fails computing dhrystone loop iterations

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 5 12:15:13 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16235

            Bug ID: 16235
           Summary: ScalarEvolution::ComputeExitLimitFromICmp fails
                    computing dhrystone loop iterations
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: marksl at synopsys.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10634
  --> http://llvm.org/bugs/attachment.cgi?id=10634&action=edit
A simplified test case with the problematic FOR loop

GCC folds the number of loop iterations to 2.  LLVM does not when it appears it
could.

typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5} Enumeration;

typedef int One_Fifty;
typedef int Arr_1_Dim [50];
typedef int Arr_2_Dim [50] [50];

extern int Int_Glob;

void
Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val)
Arr_1_Dim Arr_1_Par_Ref;
Arr_2_Dim Arr_2_Par_Ref;
int Int_1_Par_Val;
int Int_2_Par_Val;
{
      One_Fifty Int_Index;
      One_Fifty Int_Loc;

  Int_Loc = Int_1_Par_Val + 5;
  Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
  Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
  Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
  for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
    Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
  Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
  Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
  Int_Glob = 5;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130605/e6f0dcef/attachment.html>


More information about the llvm-bugs mailing list