]> 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>
Sun, 30 Oct 2011 10:30:06 +0000 (11:30 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 30 Oct 2011 10:30:06 +0000 (11:30 +0100)
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

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

index 6decb93352db3a393428e818884e1cf5b9480010..92895bc1be8481976d95b7f119ee245159ae7acc 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-30  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-29  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR target/50691
index 007844015a4fe7772424bc2ef6c6f180961d380c..bc97e50ff8648f81c0ed2a5c07d4dc6663de021e 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 75458699ea83a8132d6259816b2009ac526a4317..40668ca0b0d52e027366a752ecf8aa785298c35e 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-30  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-23  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/50788
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" } }