[LLVMbugs] [Bug 20645] New: Dead Store Elimination breaks pointer return value

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 13 03:37:49 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20645

            Bug ID: 20645
           Summary: Dead Store Elimination breaks pointer return value
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-bugs130814 at oli-obk.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12890
  --> http://llvm.org/bugs/attachment.cgi?id=12890&action=edit
a non minimal test case

a few optimizations will yield the following code in the ifcont block

ifcont:                                           ; preds = %entry, %else
  %storemerge = phi double [ %5, %else ], [ 1.000000e+00, %entry ]
  store double %storemerge, double* %myfun.1
  ret double* %myfun.1

which is marked as dead by the DSE

DSE: Dead Store at End of Block:
  DEAD:   store double %storemerge, double* %myfun.1
  Objects:   %myfun.1 = alloca double

running "opt bug.ll -o bug.optimized.ll -S -O3 -debug -print-after-all" will
basically erase the whole program. Compiling "bug.ll" without optimizations and
running it will return the 6th fibonacci number 8 as expected.

-- 
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/20140813/acf3a7a4/attachment.html>


More information about the llvm-bugs mailing list