[LLVMbugs] [Bug 17496] New: __builtin_copysignf fails to produce result -0.0f
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Oct 7 08:04:08 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17496
Bug ID: 17496
Summary: __builtin_copysignf fails to produce result -0.0f
Product: new-bugs
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: nrink at broadcom.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I am using the X86 backend, but have "Expand" set as the lowering operation for
the following ISD node types:
FNEG,
FABS,
FCOPYSIGN
(in X86ISelLowering.cpp). With these node expansions, the following program
outputs "0x00000000":
#include <stdio.h>
float x = 0.0f;
float y = -2.0f;
int main()
{
float r = __builtin_copysignf(x, y);
printf("0x%08x\n", *(unsigned int*)&r);
return 0;
}
When compiled with gcc, it gives "0x80000000", as I would expect.
--
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/20131007/ee1c2857/attachment.html>
More information about the llvm-bugs
mailing list