From: Uros Bizjak Date: Thu, 27 Oct 2011 19:07:27 +0000 (+0200) Subject: re PR target/50875 (O3 and -mavx lead to internal compiler error: in find_reloads) X-Git-Tag: releases/gcc-4.7.0~2761 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a92aa31dd3498b1dac695bb71aab5fa6527e1f58;p=thirdparty%2Fgcc.git re PR target/50875 (O3 and -mavx lead to internal compiler error: in find_reloads) PR target/50875 * config/i386/sse.md (*avx2_unpcklpd256): Remove extra insn constraints. Change alternative 1 to "x,m,1". testsuitee/ChangeLog: PR target/50875 * gfortran.dg/pr50875.f90: New test. From-SVN: r180576 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e025e280de05..13ba1f1c75a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak + + PR target/50875 + * config/i386/sse.md (*avx2_unpcklpd256): Remove extra insn + constraints. Change alternative 1 to "x,m,1". + 2011-10-27 Jakub Jelinek * Makefile.in (build/gencheck.o): Depend on tree.def and @@ -18,8 +24,7 @@ 2011-10-27 Ian Lance Taylor * cppdefault.c: Undef NATIVE_SYSTEM_HEADER_DIR if - CROSS_DIRECTORY_STRUCTURE is defined and TARGET_SYSTEM_ROOT is - not. + CROSS_DIRECTORY_STRUCTURE is defined and TARGET_SYSTEM_ROOT is not. (cpp_include_defaults): Only use NATIVE_SYSTEM_HEADER_DIR if it is defined. @@ -270,8 +275,8 @@ 2011-10-25 Dodji Seketeli - * input.c (expand_location): Rewrite using - linemap_resolve_location and linemap_expand_location. Add a comment. + * input.c (expand_location): Rewrite using linemap_resolve_location + and linemap_expand_location. Add a comment. 2011-10-25 Jakub Jelinek @@ -472,7 +477,7 @@ (*mov_insn_vis3): New insn. (*mov_insn_sp64_vis3): New insn. (*mov_insn_sp32_vis3): New insn. - (VM64 reg<-->reg split): New spliiter for 32-bit. + (VM64 reg<-->reg split): New splitter for 32-bit. * config/sparc/sparc.c (sparc_split_regreg_legitimate): New function. * config/sparc/sparc-protos.h (sparc_split_regreg_legitimate): @@ -550,22 +555,23 @@ 2011-10-23 Tom de Vries PR tree-optimization/50763 - * tree-ssa-tail-merge.c (same_succ_flush_bb): New function, factored out - of ... + * tree-ssa-tail-merge.c (same_succ_flush_bb): New function, factored + out of ... (same_succ_flush_bbs): Use same_succ_flush_bb. (purge_bbs): Remove argument. Remove calls to same_succ_flush_bbs, release_last_vdef and delete_basic_block. (unlink_virtual_phi): New function. (update_vuses): Add and use vuse1_phi_args argument. Set var to - SSA_NAME_VAR of vuse1 or vuse2, and use var. Handle case that def_stmt2 - is NULL. Use phi result as phi arg in case vuse1 or vuse2 is NULL_TREE. - Replace uses of vuse1 if vuse2 is NULL_TREE. Fix code to limit - replacement of uses. Propagate phi argument for phis with a single - argument. + SSA_NAME_VAR of vuse1 or vuse2, and use var. Handle case that + def_stmt2 is NULL. Use phi result as phi arg in case vuse1 or vuse2 + is NULL_TREE. Replace uses of vuse1 if vuse2 is NULL_TREE. Fix code + to limit replacement of uses. Propagate phi argument for phis with a + single argument. (replace_block_by): Update vops if phi_vuse1 or phi_vuse2 is NULL_TREE. - Set vuse1_phi_args if vuse1 is a phi defined in bb1. Add vuse1_phi_args - as argument to call to update_vuses. Call release_last_vdef, - same_succ_flush_bb, delete_basic_block. Update CDI_DOMINATORS info. + Set vuse1_phi_args if vuse1 is a phi defined in bb1. Add + vuse1_phi_args as argument to call to update_vuses. Call + release_last_vdef, same_succ_flush_bb, delete_basic_block. Update + CDI_DOMINATORS info. (tail_merge_optimize): Remove argument in call to purge_bbs. Remove call to free_dominance_info. Only call calculate_dominance_info once. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 740f8c856ede..c4366ba4ba04 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4231,15 +4231,14 @@ [(set (match_operand:V4DF 0 "register_operand" "=x,x") (vec_select:V4DF (vec_concat:V8DF - (match_operand:V4DF 1 "nonimmediate_operand" "xm,x") - (match_operand:V4DF 2 "nonimmediate_operand" " 1,xm")) + (match_operand:V4DF 1 "nonimmediate_operand" " x,m") + (match_operand:V4DF 2 "nonimmediate_operand" "xm,1")) (parallel [(const_int 0) (const_int 4) (const_int 2) (const_int 6)])))] - "TARGET_AVX - && (!MEM_P (operands[1]) || rtx_equal_p (operands[1], operands[2]))" + "TARGET_AVX" "@ - vmovddup\t{%1, %0|%0, %1} - vunpcklpd\t{%2, %1, %0|%0, %1, %2}" + vunpcklpd\t{%2, %1, %0|%0, %1, %2} + vmovddup\t{%1, %0|%0, %1}" [(set_attr "type" "sselog") (set_attr "prefix" "vex") (set_attr "mode" "V4DF")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6078fdd3b9bb..b273f36e6e43 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak + Steven G. Kargl + + PR target/50875 + * gfortran.dg/pr50875.f90: New test. + 2011-10-26 David S. Miller * gcc.target/sparc/fmaf-1.c: New test. @@ -7,8 +13,7 @@ 2011-10-26 Joseph Myers - * gcc.dg/tls/thr-cse-1.c: For i?86-*-mingw*, check for multiple - calls. + * gcc.dg/tls/thr-cse-1.c: For i?86-*-mingw*, check for multiple calls. 2011-10-26 Joseph Myers @@ -311,7 +316,7 @@ 2011-10-20 Richard Henderson * gcc.target/i386/vperm-v2df.c, gcc.target/i386/vperm-v2di.c, - gcc.target/i386/vperm-v4sf-1.c, gcc.target/i386/vperm-v4sf-2.c, + gcc.target/i386/vperm-v4sf-1.c, gcc.target/i386/vperm-v4sf-2.c, gcc.target/i386/vperm-v4si-1.c, gcc.target/i386/vperm-v4si-2.c: Use __builtin_shuffle. diff --git a/gcc/testsuite/gfortran.dg/pr50875.f90 b/gcc/testsuite/gfortran.dg/pr50875.f90 new file mode 100644 index 000000000000..6b4476c14e4b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr50875.f90 @@ -0,0 +1,39 @@ +! { dg-do compile { target { i?86-*-* x86_64-*-* } } } +! { dg-options "-O3 -mavx" } +! +! PR fortran/50875.f90 + +module test + + implicit none + + integer, parameter :: dp=kind(1.d0) + + integer :: P = 2 + + real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:) + complex(kind=dp), allocatable :: cmplx_array_A(:) + +contains + + subroutine routine_A + + integer :: i + + allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P)) + + real_array_A = 1 + real_array_B = 1 + + do i = 1, p + cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp) + cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1)) + end do + + deallocate(cmplx_array_A,real_array_B,real_array_A) + + end subroutine routine_A + +end module test + +! { dg-final { cleanup-modules "test" } }