Patchwork [x32] PATCH: PR target/47381: [x32] internal compiler error: in gen_lowpart_general, at rtlhooks.c:59

login
register
mail settings
Submitter H.J. Lu
Date Jan. 20, 2011, 7:07 p.m.
Message ID <20110120190710.GA20305@intel.com>
Download mbox | patch
Permalink /patch/79752/
State New
Headers show

Comments

H.J. Lu - Jan. 20, 2011, 7:07 p.m.
On Thu, Jan 20, 2011 at 09:30:36AM -0800, H.J. Lu wrote:
> Hi,
> 
> Symbolic constants aren't supported by LEA for x32.  I checked in this
> patch to disable it.
> 
> 

I missed another one.  Checked it in.

H.J.
---
commit 89a5010b08537ed7ce7c589a057082cc049dc1c4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 20 11:04:34 2011 -0800

    Use x32_lea_nonmemory_operand on 64bit LEA split.

Patch

diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index ed72339..f2f16ac 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,6 +1,12 @@ 
 2011-01-20  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR target/47381
+	* config/i386/i386.md (64bit LEA split): Replace nonmemory_operand
+	with x32_lea_nonmemory_operand.
+
+2011-01-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/47381
 	* config/i386/constraints.md (Yl): New.
 
 	* config/i386/i386.md (l): New.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 862dd4f..cb044df 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -6084,7 +6084,7 @@ 
   [(set (match_operand:DI 0 "register_operand" "")
 	(zero_extend:DI
 	  (plus:SI (match_operand:SI 1 "register_operand" "")
-		   (match_operand:SI 2 "nonmemory_operand" ""))))
+		   (match_operand:SI 2 "x32_lea_nonmemory_operand" ""))))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_64BIT && reload_completed
    && ix86_lea_for_add_ok (insn, operands)"
diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32
index 28b6f47..371f822 100644
--- a/gcc/testsuite/ChangeLog.x32
+++ b/gcc/testsuite/ChangeLog.x32
@@ -1,6 +1,11 @@ 
 2011-01-20  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR target/47381
+	* gcc.target/i386/pr47381-3.c: New.
+
+2011-01-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/47381
 	* gcc.target/i386/pr47381-1.c: New.
 	* gcc.target/i386/pr47381-2.c: Likewise.
 
diff --git a/gcc/testsuite/gcc.target/i386/pr47381-3.c b/gcc/testsuite/gcc.target/i386/pr47381-3.c
new file mode 100644
index 0000000..c4b2127
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr47381-3.c
@@ -0,0 +1,13 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=atom" } */
+
+struct foo_t {
+  int limit;
+} foo[3];
+void
+bar () {
+  int i;
+  for (i = 0; i < 3; i++) {
+    __builtin_memset (&foo[i], 0, sizeof(*foo));
+  }
+}