This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR target/39152: [4.4 regression] Revision 144098 breaks 416.gamess in SPEC CPU 2006


There are

insn 1988 1119 1121 173
/export/gnu/src/gcc-work/gcc/libgomp/testsuite/libgomp.fortran/omp_parse4.f90:28
(set (reg:SI 2 cx [orig:190 D.2207 ] [190])
        (reg:SI 21 xmm0)) 47 {*movsi_1} (expr_list:REG_DEAD (reg:SI 21
xmm0)
        (nil)))

(note:HI 1121 1988 1600 173 NOTE_INSN_DELETED)

(insn:HI 1600 1121 1609 173
/export/gnu/src/gcc-work/gcc/libgomp/testsuite/libgomp.fortran/omp_parse4.f90:28
(parallel [
            (set (reg:SI 2 cx [orig:190 D.2207 ] [190])
                (plus:SI (reg:SI 2 cx [orig:190 D.2207 ] [190])
                    (mem/s:SI (plus:SI (reg/f:SI 1 dx [orig:511
pretmp.178 ]
[511])
                            (const_int 32 [0x20])) [2 S4 A32])))
            (clobber (reg:CC 17 flags))
        ]) 285 {*addsi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

We can't replace Mov+MemOp with Load+RegOp here.  OK for trunk?

Thanks.



H.J.
----
gcc/

2009-02-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/39152
	* config/i386/i386.md: Restrict the new peephole2 to move
	between the same register class.


gcc/libgomp/testsuite/

2009-02-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/39152
	* libgomp.fortran/pr39152.f90: New.

--- gcc/gcc/config/i386/i386.md.regclass	2009-02-12 09:17:09.000000000 -0800
+++ gcc/gcc/config/i386/i386.md	2009-02-12 12:45:20.000000000 -0800
@@ -20736,7 +20736,13 @@
                      [(match_dup 0)
                       (match_operand:SI 2 "memory_operand" "")]))
               (clobber (reg:CC FLAGS_REG))])]
-  "operands[0] != operands[1]"
+  "operands[0] != operands[1]
+   && ((GENERAL_REGNO_P (REGNO (operands[0]))
+	&& GENERAL_REGNO_P (REGNO (operands[1])))
+       || (SSE_REGNO_P (REGNO (operands[0]))
+	   && SSE_REGNO_P (REGNO (operands[1])))
+       || (MMX_REGNO_P (REGNO (operands[0]))
+	   && MMX_REGNO_P (REGNO (operands[1]))))"
   [(set (match_dup 0) (match_dup 4))
    (parallel [(set (match_dup 0)
                    (match_op_dup 3 [(match_dup 0) (match_dup 1)]))
--- gcc/libgomp/testsuite/libgomp.fortran/pr39152.f90.regclass	2009-02-12 12:20:55.000000000 -0800
+++ gcc/libgomp/testsuite/libgomp.fortran/pr39152.f90	2009-02-12 12:41:18.000000000 -0800
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! { dg-options "-mavx -O3 -funroll-all-loops" { target { i?86-*-* x86_64-*-* } } } 
+
+!$ use omp_lib
+  call test_workshare
+
+contains
+  subroutine test_workshare
+    integer :: i, j, k, l, m
+    double precision, dimension (64) :: d, e
+    integer, dimension (10) :: f, g
+    integer, dimension (16, 16) :: a, b, c
+    integer, dimension (16) :: n
+!$omp parallel num_threads (4) private (j, k)
+!$omp barrier
+!$omp workshare
+    where (g .lt. 0)
+      f = 100
+    elsewhere
+      where (g .gt. 6) f = f + sum (g)
+      f = 300 + f
+    end where
+!$omp end workshare nowait
+!$omp workshare
+    forall (j = 1:16, k = 1:16) b (k, j) = a (j, k)
+    forall (j = 2:16, n (17 - j) / 4 * 4 .ne. n (17 - j))
+      n (j) = n (j - 1) * n (j)
+    end forall
+!$omp endworkshare
+!$omp end parallel
+
+  end subroutine test_workshare
+end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]