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

            Bug ID: 31522
           Summary: [guards] Jump threading of guards
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: listm...@philipreames.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

JumpThreading should handle guards when the guard can be reorder to the
beginning of the block and the guard condition is known to be true along some
inbound paths.

if (a != null) {
  a->f = 5;
}
guard (a != null);

==>
if (a != null) {
  a->f = 5;
} else {
  guard (a != null);
}

Note that we only need to handle the relatively simple cases.  The idea is to
allow better canonicalization before lowering, not to duplicate the entirety of
our optimizations over branches on guards.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to