[llvm-bugs] [Bug 27162] New: Dead stores from lowered memset

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 31 09:26:17 PDT 2016


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

            Bug ID: 27162
           Summary: Dead stores from lowered memset
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: junbuml at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Given the below C code :

void foo (long *P, long n) {
  memset(P, 0, 32);
  P[0] = n;
  P[1] = n;
  P[2] = n;
}

Current trunk generate asm code like below :

  stp    xzr, xzr, [x0, #16]
  stp        xzr, xzr, [x0]
  stp        x1, x1, [x0]
  str    x1, [x0, #16]
  ret

The lowered store instructions from memset are dead by the stores following the
memset.

-- 
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/20160331/dc3999f7/attachment.html>


More information about the llvm-bugs mailing list