[llvm-bugs] [Bug 46356] Wrong optimization of a division by zero

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 16 18:51:03 PDT 2020


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

Craig Topper <craig.topper at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |craig.topper at gmail.com
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Craig Topper <craig.topper at gmail.com> ---
Integer division by 0 is undefined behavior. We aren't required to produce any
particular result and we aren't required to trap. gcc also produces a value of
1.

-- 
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/20200617/2d3a6702/attachment.html>


More information about the llvm-bugs mailing list