From: Uros Bizjak Date: Sun, 30 Oct 2011 10:30:06 +0000 (+0100) Subject: re PR target/50875 (O3 and -mavx lead to internal compiler error: in find_reloads) X-Git-Tag: releases/gcc-4.5.4~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15dc5e874a9ac5dc78037ae957bde8909873b3e5;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". testsuite/ChangeLog: PR target/50875 * gfortran.dg/pr50875.f90: New test. From-SVN: r180676 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6decb93352db..92895bc1be84 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-30 Uros Bizjak + + PR target/50875 + * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn + constraints. Change alternative 1 to "x,m,1". + 2011-10-29 John David Anglin PR target/50691 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 007844015a4f..bc97e50ff864 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4551,15 +4551,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 75458699ea83..40668ca0b0d5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-10-30 Uros Bizjak + + PR target/50875 + * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn + constraints. Change alternative 1 to "x,m,1". + 2011-10-23 Uros Bizjak PR target/50788 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" } }