search for: pfadd

Displaying 4 results from an estimated 4 matches for "pfadd".

Did you mean: fadd
2011 Apr 14
2
[LLVMdev] [x86 codegen] 3DNow! intrinsics not behaving as expected.
...the 3DNow! instruction intrinsics and builtins into LLVM and Clang, however, while testing them, I've noticed that they produce incorrect results. For example: typedef float V2f __attribute__((vector_size(8))); int main() { V2f dest, a = {1.0, 3.0}, b = {10.0, 3.5}; dest = __builtin_ia32_pfadd(a, b); printf("(%f, %f)\n", dest[0], dest[1]); } Should output (11, 6.5). However, it outputs different values depending on the optimization level. Generally one of them is correct, and the other is -nan. I looked at the program using a debugger, and the pfadd instruction is executed...
2011 Apr 14
2
[LLVMdev] [x86 codegen] 3DNow! intrinsics not behaving as expected.
On Apr 14, 2011, at 12:47 PM, Eli Friedman wrote: >> I looked at the program using a debugger, and the pfadd instruction is >> executed correctly and the MMX register contains the correct values. >> The code that prepares the stack for the printf call seems to be >> messing it up. > > I would call that "user error"; basically, using MMX instructions > messes up the FP...
2011 Apr 14
0
[LLVMdev] [x86 codegen] 3DNow! intrinsics not behaving as expected.
...s > into LLVM and Clang, however, while testing them, I've noticed that > they produce incorrect results. > > For example: > > typedef float V2f __attribute__((vector_size(8))); > > int main() { >  V2f dest, a = {1.0, 3.0}, b = {10.0, 3.5}; >  dest = __builtin_ia32_pfadd(a, b); >  printf("(%f, %f)\n", dest[0], dest[1]); > } > > Should output (11, 6.5). However, it outputs different values > depending on the optimization level. Generally one of them is correct, > and the other is -nan. > > I looked at the program using a debugger, a...
2011 Apr 14
0
[LLVMdev] [x86 codegen] 3DNow! intrinsics not behaving as expected.
On Thu, Apr 14, 2011 at 5:37 PM, Chris Lattner <clattner at apple.com> wrote: > > On Apr 14, 2011, at 12:47 PM, Eli Friedman wrote: > >>> I looked at the program using a debugger, and the pfadd instruction is >>> executed correctly and the MMX register contains the correct values. >>> The code that prepares the stack for the printf call seems to be >>> messing it up. >> >> I would call that "user error"; basically, using MMX instructions &g...