From: Uros Bizjak Date: Thu, 27 Oct 2011 21:55:22 +0000 (+0200) Subject: re PR target/50875 (O3 and -mavx lead to internal compiler error: in find_reloads) X-Git-Tag: releases/gcc-4.6.3~382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4d201c3465dedc0e43ed0d58928d5fae80ad0ae;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 (*avx_unpcklpd256): Remove extra insn constraints. Change alternative 1 to "x,m,1". testsuitee/ChangeLog: PR target/50875 * gfortran.dg/pr50875.f90: New test. Co-Authored-By: Steven G. Kargl From-SVN: r180582 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 492bb204d304..8e6377b392f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak + + PR target/50875 + * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn + constraints. Change alternative 1 to "x,m,1". + 2011-10-26 Jakub Jelinek * BASE-VER: Set to 4.6.3. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 753641874659..b5b900a02a55 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4521,15 +4521,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 5b1ad2cc1b40..797c7c054fa3 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 Release Manager * GCC 4.6.2 released. 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" } }