[llvm-bugs] [Bug 25824] New: incorrect saving/restoring points in shrink-wrap

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 14 11:46:47 PST 2015


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

            Bug ID: 25824
           Summary: incorrect saving/restoring points in shrink-wrap
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: weimingz at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Given a loop, like

  HeadBB
    /   \
   /     \
  /       \
ExitingPath\
            \  
            someBB
             / \
            /   \
(BB1)Def of CSR  \
                  \
            (BB2)  Use of CSR


Since HeadBB dominates both BB1 and BB2, and HeadBB post-doms BB1 and BB2,
eventually, it returning HeadBB as saving and restoring point. As a result,
Epilog/Prolog Inserter inserts a pair of push/pop in HeadBB, which in
incorrect.

Domination only guarantees the def in dominator will reach it's descendants,
but it doesn't guarantee the value in HeadBB is before the change made in BB1.

-- 
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/20151214/dc687569/attachment-0001.html>


More information about the llvm-bugs mailing list