diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2011-10-27 21:07:27 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2011-10-27 21:07:27 +0200 |
commit | a92aa31dd3498b1dac695bb71aab5fa6527e1f58 (patch) | |
tree | c23c1d0b4ea662baac27e949bfc287905d59f0be | |
parent | 16fe2c09f7ebf82bfc602f7b1268656ff78b6cdc (diff) | |
download | gcc-a92aa31dd3498b1dac695bb71aab5fa6527e1f58.zip gcc-a92aa31dd3498b1dac695bb71aab5fa6527e1f58.tar.gz gcc-a92aa31dd3498b1dac695bb71aab5fa6527e1f58.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 36 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 11 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr50875.f90 | 39 |
4 files changed, 73 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e025e28..13ba1f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak <ubizjak@gmail.com> + + 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 <jakub@redhat.com> * Makefile.in (build/gencheck.o): Depend on tree.def and @@ -18,8 +24,7 @@ 2011-10-27 Ian Lance Taylor <iant@google.com> * 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 <dodji@redhat.com> - * 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 <jakub@redhat.com> @@ -472,7 +477,7 @@ (*mov<VM32:mode>_insn_vis3): New insn. (*mov<VM64:mode>_insn_sp64_vis3): New insn. (*mov<VM64:mode>_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 <tom@codesourcery.com> 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 740f8c8..c4366ba 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 6078fdd..b273f36 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak <ubizjak@gmail.com> + Steven G. Kargl <kargl@gcc.gnu.org> + + PR target/50875 + * gfortran.dg/pr50875.f90: New test. + 2011-10-26 David S. Miller <davem@davemloft.net> * gcc.target/sparc/fmaf-1.c: New test. @@ -7,8 +13,7 @@ 2011-10-26 Joseph Myers <joseph@codesourcery.com> - * 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 <joseph@codesourcery.com> @@ -311,7 +316,7 @@ 2011-10-20 Richard Henderson <rth@redhat.com> * 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 0000000..6b4476c --- /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" } } |