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: unassignedb...@nondot.org
          Reporter: florian_h...@apple.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to