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: unassignedb...@nondot.org
          Reporter: weimi...@codeaurora.org
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to