[LLVMbugs] [Bug 8466] New: SimplifyLibCalls behaves host-dependent(eg. nearbyint)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 26 00:55:53 PDT 2010


           Summary: SimplifyLibCalls behaves host-dependent(eg. nearbyint)
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: geek4civic at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Quoted from test/Transforms/SimplifyLibCalls/floor.ll

; Source
declare double @nearbyint(double)

define float @test_nearbyint(float %C) {
  %D = fpext float %C to double
  %E = call double @nearbyint( double %D ) ; --> nearbyintf
  %F = fptrunc double %E to float
  ret float %F

; Expected output
define float @test_nearbyint(float %C) {
  %D = fpext float %C to double
  %nearbyintf = call float @nearbyintf(float %C)
  %E = fpext float %nearbyintf to double
  %F = fptrunc double %E to float
  ret float %F

With opt.exe built on Microsoft Visual Studio 10, this is not transformed.

Its behavior depends on host's HAVE_NEARBYINTF.

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