[llvm-bugs] [Bug 48333] wrong code with "-inline -early-cse-memssa -simplifycfg -instcombine -loop-unroll"

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 18 08:15:21 PST 2020


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

Florian Hahn <florian_hahn at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |florian_hahn at apple.com

--- Comment #1 from Florian Hahn <florian_hahn at apple.com> ---
I think the program contains at least 2 cases of UB (try -fsanitize=undefined).
d = -19:
* negative shift in `*f = (f == f) >> *f;`
* negative index for `c = b[d];`

I strongly suspect that is the source of the differences with optimizations. I
tried with d = 1 and the test produces consistent result. Please re-open in
case I missed something or if there's a non-UB version of the original program
that shows the issue.

-- 
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/20201218/ee808b2c/attachment.html>


More information about the llvm-bugs mailing list