Commit 26084432 by Sriraman Tallam Committed by Sriraman Tallam

re PR target/59390 (presence of __attribute__((target("fma"))) declaration breaks __builtin_fma)

2013-12-11  Sriraman Tallam  <tmsriram@google.com>

	PR target/59390
	* config/i386/i386.c (get_builtin): New function.
	(ix86_builtin_vectorized_function): Replace all instances of
	ix86_builtins[...] with get_builtin(...).
	(ix86_builtin_reciprocal): Ditto.

	PR target/59390
	* gcc.target/i386/pr59390.c: New test.
	* gcc.target/i386/pr59390_1.c: New test.
	* gcc.target/i386/pr59390_2.c: New test.

Tested boot-strap on all languages and test parity on x86_64 and with -m32.

From-SVN: r205904
parent 711df88d
2013-12-11 Sriraman Tallam <tmsriram@google.com>
PR target/59390
* config/i386/i386.c (get_builtin): New function.
(ix86_builtin_vectorized_function): Replace all instances of
ix86_builtins[...] with get_builtin(...).
(ix86_builtin_reciprocal): Ditto.
2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* langhooks.h (lang_hooks_for_decls): Remove lang_hooks_for_cilkplus.
2013-12-11 Sriraman Tallam <tmsriram@google.com>
PR target/59390
* gcc.target/i386/pr59390.c: New test.
* gcc.target/i386/pr59390_1.c: New test.
* gcc.target/i386/pr59390_2.c: New test.
2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* g++.dg/cilk-plus/CK/catch_exc.cc: New test case.
......
/* { dg-do compile } */
/* { dg-options "-std=c99 -O3" } */
#include "math.h"
void fun() __attribute__((target("fma")));
void
other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
{
int i;
for (i = 0; i < n; i++) {
out[i] = fma(a[i], b[i], c[i]);
}
}
/* { dg-final { scan-assembler-not "vfmadd" } } */
/* { dg-do compile } */
/* { dg-options "-std=c99 -O3" } */
#include "math.h"
void fun() __attribute__((target("fma")));
__attribute__((target("fma")))
void
other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
{
int i;
for (i = 0; i < n; i++) {
out[i] = fma(a[i], b[i], c[i]);
}
}
/* { dg-final { scan-assembler "vfmadd" } } */
/* { dg-do compile } */
/* { dg-options "-std=c99 -O3 -mfma" } */
#include "math.h"
void fun() __attribute__((target("fma")));
void
other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
{
int i;
for (i = 0; i < n; i++) {
out[i] = fma(a[i], b[i], c[i]);
}
}
/* { dg-final { scan-assembler "vfmadd" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment