[llvm-bugs] [Bug 45939] New: [LoopUnrollPeel] wrong-code with reduced test case

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 15 04:36:14 PDT 2020


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

            Bug ID: 45939
           Summary: [LoopUnrollPeel]  wrong-code with reduced test case
           Product: libraries
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

int a[256];
int b, c, d;
main() {
  c = 0;
  for (; c < 256; c++)
    a[c] = c;
  for (; d; d++)
    ;
  printf("checksum = %X\n", b);
}


clang -O3 -march=z13 tc_peel2.i -o a.out -Wall; ./a.out
checksum = 0

clang -O3 -march=z13 tc_peel2.i -o a.out -Wall -mllvm -unroll-peel-count=2
checksum = 101

-- 
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/20200515/b954ed19/attachment.html>


More information about the llvm-bugs mailing list