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