https://llvm.org/bugs/show_bug.cgi?id=26956

            Bug ID: 26956
           Summary: [SLP] Missed opportunity to generate min/max reduction
                    for fully unrolled loop
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

# define MAX(x,y) ((x)>(y)?(x):(y))

double arr[16];
double bar() {
  double max = arr[0];
  for (int i = 1; i < 16; ++i)
    max = MAX(max, arr[i]);
  return max;
}

Given the above code, LLVM currently fully unrolls the loop and the SLP
vectorizer is unable to vectorize the resulting code.  If we replace the
constant 16 with an unknown trip count the loop vectorizer will catch this
case.

Please feel free to provide feedback as I'd like to solve this problem, but I
have no experience with the SLP vectorizer.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to