[LLVMbugs] [Bug 8577] New: improve side effect modelling of standard lib functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 9 15:02:45 PST 2010


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

           Summary: improve side effect modelling of standard lib
                    functions
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: quality-of-implementation
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: xinliangli at gmail.com
                CC: llvmbugs at cs.uiuc.edu, xinliangli at gmail.com


#include <math.h>

int g = 1, g2;
 double d = 1;
void foo()
{

    g = 1;
    d = exp(d);
    g2 = g;
}


g = 1 should be const propagated. Clang does not do this even with -ffast-math.
Gcc is also weak, but it treats exp as pure when -ffast-math is specified.


David

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list