[llvm-bugs] [Bug 45470] GVN incorrectly optimizes away a non-local	load
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Wed Apr  8 02:35:29 PDT 2020
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=45470
Florian Hahn <florian_hahn at apple.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 CC|                            |florian_hahn at apple.com
--- Comment #1 from Florian Hahn <florian_hahn at apple.com> ---
IIUC %offset in the loop will always be >= 2 due to `or i32 %tmp1, 2`. So the
loop only stores to elements with index 2 or higher. The load in .loopexit
loads the element at index 0, which is never initialized and can be replaced
with undef. I think GVN does the right thing. If you remove the or (and hence
index 0 can be store to), the load is not removed.
Please re-open the issue in case I missed something.
-- 
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/20200408/0be432f0/attachment.html>
    
    
More information about the llvm-bugs
mailing list