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

            Bug ID: 52143
           Summary: memset not generated for ** array zero-initialization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: beginner
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

clang at -O2 missed opportunity to generate memset for 
unsigned** a;
void foo( int max )
{
  for (int i = 0; i <= max; ++i) 
  {
    a[i] = 0;
  }
}
and left the loop, while gcc succeeded to do this:
X86-64 https://godbolt.org/z/oK59vf66n
AArch64 https://godbolt.org/z/G53W1vz7W

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

Reply via email to