[LLVMbugs] [Bug 20806] New: [EarlyCSE, GVN, Missed Opt] invariant loads can be forwarded across aliasing stores

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 29 14:00:41 PDT 2014


            Bug ID: 20806
           Summary: [EarlyCSE, GVN, Missed Opt] invariant loads can be
                    forwarded across aliasing stores
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: listmail at philipreames.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12956
  --> http://llvm.org/bugs/attachment.cgi?id=12956&action=edit
Failing test case for EarlyCSE

LLVM supports the "invariant.load" metadata which indicates that the value
loaded from that location can not change during execution of the code visible
to LLVM.  This enables us to forward the values of invariant loads across
potentially aliasing stores (or even provably aliasing stores since that would
be undefined.)

We currently exploit this property in LICM to lift such loads out of loops and
forward the value to all uses in all iterations.  

We can apply the same reasoning to load value forwarding performed by EarlyCSE
and GVN.  I have attached a test case for EarlyCSE and will add another for GVN

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/20140829/b1154047/attachment.html>

More information about the llvm-bugs mailing list