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

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to