diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0876d0dced91cfc9b066ede64606d0141ebb56d0..616ea15bd6e82b74952a40446c59d011de5a2531 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,13 @@ +2006-02-16 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR libfortran/24903 + * m4/dotprodc.m4: Use __builtin_conj instead of assigning real + and imaginary parts separately. + * generated/dotprod_c4.c: Regenerated. + * generated/dotprod_c8.c: Regenerated. + * generated/dotprod_c10.c: Regenerated. + * generated/dotprod_c16.c: Regenerated. + 2006-02-12 Janne Blomqvist <jb@gcc.gnu.org> PR libgfortran/25949 diff --git a/libgfortran/generated/dotprod_c10.c b/libgfortran/generated/dotprod_c10.c index 0dccca71ec72eb42d07b9702d345cba318e9dccd..b68b0d3b5e6509013be586fb4e517d7ff2268f68 100644 --- a/libgfortran/generated/dotprod_c10.c +++ b/libgfortran/generated/dotprod_c10.c @@ -49,7 +49,6 @@ dot_product_c10 (gfc_array_c10 * const restrict a, gfc_array_c10 * const restric const GFC_COMPLEX_10 * restrict pa; const GFC_COMPLEX_10 * restrict pb; GFC_COMPLEX_10 res; - GFC_COMPLEX_10 conjga; index_type count; index_type astride; index_type bstride; @@ -71,8 +70,7 @@ dot_product_c10 (gfc_array_c10 * const restrict a, gfc_array_c10 * const restric while (count--) { - COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); - res += conjga * *pb; + res += __builtin_conjl (*pa) * *pb; pa += astride; pb += bstride; } diff --git a/libgfortran/generated/dotprod_c16.c b/libgfortran/generated/dotprod_c16.c index 6d17ba7409d928ced2559e2a21dd38adcbbcb22c..82d5d49ea92e072cd572bbdd6d9542096a023c4e 100644 --- a/libgfortran/generated/dotprod_c16.c +++ b/libgfortran/generated/dotprod_c16.c @@ -49,7 +49,6 @@ dot_product_c16 (gfc_array_c16 * const restrict a, gfc_array_c16 * const restric const GFC_COMPLEX_16 * restrict pa; const GFC_COMPLEX_16 * restrict pb; GFC_COMPLEX_16 res; - GFC_COMPLEX_16 conjga; index_type count; index_type astride; index_type bstride; @@ -71,8 +70,7 @@ dot_product_c16 (gfc_array_c16 * const restrict a, gfc_array_c16 * const restric while (count--) { - COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); - res += conjga * *pb; + res += __builtin_conjl (*pa) * *pb; pa += astride; pb += bstride; } diff --git a/libgfortran/generated/dotprod_c4.c b/libgfortran/generated/dotprod_c4.c index a575dc9896906577f05e2473dcfd7d1aecbccffd..7f336234fe87b9ed3de299a9f09369e6fb021b8f 100644 --- a/libgfortran/generated/dotprod_c4.c +++ b/libgfortran/generated/dotprod_c4.c @@ -49,7 +49,6 @@ dot_product_c4 (gfc_array_c4 * const restrict a, gfc_array_c4 * const restrict b const GFC_COMPLEX_4 * restrict pa; const GFC_COMPLEX_4 * restrict pb; GFC_COMPLEX_4 res; - GFC_COMPLEX_4 conjga; index_type count; index_type astride; index_type bstride; @@ -71,8 +70,7 @@ dot_product_c4 (gfc_array_c4 * const restrict a, gfc_array_c4 * const restrict b while (count--) { - COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); - res += conjga * *pb; + res += __builtin_conjf (*pa) * *pb; pa += astride; pb += bstride; } diff --git a/libgfortran/generated/dotprod_c8.c b/libgfortran/generated/dotprod_c8.c index 00ac8a9d0cc4ecafdac555c7dc3e982c6d7aac26..df7738f381e162eeae4598f0e9dcf2c7382cb07b 100644 --- a/libgfortran/generated/dotprod_c8.c +++ b/libgfortran/generated/dotprod_c8.c @@ -49,7 +49,6 @@ dot_product_c8 (gfc_array_c8 * const restrict a, gfc_array_c8 * const restrict b const GFC_COMPLEX_8 * restrict pa; const GFC_COMPLEX_8 * restrict pb; GFC_COMPLEX_8 res; - GFC_COMPLEX_8 conjga; index_type count; index_type astride; index_type bstride; @@ -71,8 +70,7 @@ dot_product_c8 (gfc_array_c8 * const restrict a, gfc_array_c8 * const restrict b while (count--) { - COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); - res += conjga * *pb; + res += __builtin_conj (*pa) * *pb; pa += astride; pb += bstride; } diff --git a/libgfortran/m4/dotprodc.m4 b/libgfortran/m4/dotprodc.m4 index 2b8c45f15c589a790c31920eb58e6d8c5cd7ded3..415eebfe4a958e1dc9fa41c7f8fd8ec0412cd808 100644 --- a/libgfortran/m4/dotprodc.m4 +++ b/libgfortran/m4/dotprodc.m4 @@ -34,6 +34,7 @@ Boston, MA 02110-1301, USA. */ #include <assert.h> #include "libgfortran.h"' include(iparm.m4)dnl +include(mtype.m4)dnl `#if defined (HAVE_'rtype_name`)' @@ -50,7 +51,6 @@ dot_product_`'rtype_code (rtype * const restrict a, rtype * const restrict b) const rtype_name * restrict pa; const rtype_name * restrict pb; rtype_name res; - rtype_name conjga; index_type count; index_type astride; index_type bstride; @@ -73,8 +73,7 @@ sinclude(`dotprod_asm_'rtype_code`.m4')dnl while (count--) { - COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); - res += conjga * *pb; + res += __builtin_conj`'q (*pa) * *pb; pa += astride; pb += bstride; }