[llvm-bugs] [Bug 46144] New: Fix passes that introduce new branches on undef/poison

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 31 05:36:25 PDT 2020


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

            Bug ID: 46144
           Summary: Fix passes that introduce new branches on undef/poison
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: florian_hahn at apple.com
                CC: llvm-bugs at lists.llvm.org

Currently there are some passes that may introduce new branches on
undef/poison, which h potentially introduces UB where there was none before.

While the LangRef was clear about branch on poison being UB, recently it was
also clarified that this applies to branches on undef as well
(https://reviews.llvm.org/rG05f0e598ab265a80fedb23225cde4176f11774ac).

There has been some discussion about problematic passes
(https://reviews.llvm.org/D76973, 
https://reviews.llvm.org/D80875.

Nuno mentioned "The passes we are aware that introduce branch on poison are:
IndVarSimplify, LoopUnswitch, SimpleLoopUnswitch, and SimpifyCFG.
(https://web.ist.utl.pt/nuno.lopes/alive2/index.php?hash=4beb2b117e2fdd2c)"

Eli mentioned that some passes condition certain transforms on
the`Attribute::SanitizeMemory`attribute, because of MemSAN does not like new
branches on undef/poison values. See also
https://bugs.llvm.org/show_bug.cgi?id=28054

-- 
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/20200531/7629b953/attachment.html>


More information about the llvm-bugs mailing list