]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/50875 (O3 and -mavx lead to internal compiler error: in find_reloads)
authorUros Bizjak <ubizjak@gmail.com>
Thu, 27 Oct 2011 21:55:22 +0000 (23:55 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 27 Oct 2011 21:55:22 +0000 (23:55 +0200)
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 <kargl@gcc.gnu.org>
From-SVN: r180582

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr50875.f90 [new file with mode: 0644]

index 492bb204d304450d4bd7fca1877c13314f14ecad..8e6377b392f5ece7cae8880389dae520aaf01f68 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-27  Uros Bizjak  <ubizjak@gmail.com>
+
+       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  <jakub@redhat.com>
 
        * BASE-VER: Set to 4.6.3.
index 7536418746594f5d584ecba34f5bd62220356b48..b5b900a02a552595da311fb2e5c07e7a9c332dbe 100644 (file)
   [(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")])
index 5b1ad2cc1b40b882a3721089b5d9e9efe9f51ee1..797c7c054fa3ddb3180d642c6f7ffe5fa43b2d18 100644 (file)
@@ -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  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 (file)
index 0000000..6b4476c
--- /dev/null
@@ -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" } }