[llvm-bugs] [Bug 40954] New: LICM is moving an fdiv instruction out from under a control dependence

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 4 09:36:01 PST 2019


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

            Bug ID: 40954
           Summary: LICM is moving an fdiv instruction out from under a
                    control dependence
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: eric.schweitz at pgroup.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21560
  --> https://bugs.llvm.org/attachment.cgi?id=21560&action=edit
reproducer of LICM moving an fdiv instruction

In the attached reproducer, the instruction %33 is control dependent upon the
branch in block L.LB2_498.  When we run the following command,

% opt -licm bug.ll -o bug.llvm

and look at the output file, we see that the fdiv becomes %28 and has been
moved to block L.LB2_555, which is a predecessor of L.LB2_498.  This code
motion introduces a floating-point exception into the flow path which was
previously guarded by the conditional branch.

-- 
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/20190304/3be0b0a8/attachment.html>


More information about the llvm-bugs mailing list