[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-12 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 Uros Bizjak ubizjak at gmail dot com changed: What|Removed |Added Target||x32

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #46 from H.J. Lu hjl.tools at gmail dot com 2011-08-11 12:55:11 UTC --- (In reply to comment #45) (In reply to comment #44) Created attachment 24973 [details] Patch that recognizes addresses, zero-extended with AND, v2. (In

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-11 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #47 from uros at gcc dot gnu.org 2011-08-11 20:03:34 UTC --- Author: uros Date: Thu Aug 11 20:03:29 2011 New Revision: 177683 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=177683 Log: PR target/49781 *

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #43 from Uros Bizjak ubizjak at gmail dot com 2011-08-10 18:19:05 UTC --- (In reply to comment #41) Patch that recognizes addresses, zero-extended with AND It seems to generate more leal for gcc.dg/torture/pr47744-2.c No, the

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-10 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 Uros Bizjak ubizjak at gmail dot com changed: What|Removed |Added Attachment #24967|0 |1 is

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #45 from H.J. Lu hjl.tools at gmail dot com 2011-08-10 18:44:19 UTC --- (In reply to comment #44) Created attachment 24973 [details] Patch that recognizes addresses, zero-extended with AND, v2. (In reply to comment #42) It

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-09 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #38 from uros at gcc dot gnu.org 2011-08-09 07:38:07 UTC --- Author: uros Date: Tue Aug 9 07:38:02 2011 New Revision: 177583 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=177583 Log: PR target/49781 *

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-09 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #39 from Uros Bizjak ubizjak at gmail dot com 2011-08-09 18:37:37 UTC --- Created attachment 24967 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24967 Patch that recognizes addresses, zero-extended with AND Attached patch adds

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #40 from H.J. Lu hjl.tools at gmail dot com 2011-08-09 18:50:10 UTC --- (In reply to comment #39) Created attachment 24967 [details] Patch that recognizes addresses, zero-extended with AND Attached patch adds recognision of

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #41 from H.J. Lu hjl.tools at gmail dot com 2011-08-09 18:59:46 UTC --- (In reply to comment #39) Created attachment 24967 [details] Patch that recognizes addresses, zero-extended with AND Attached patch adds recognision of

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #42 from H.J. Lu hjl.tools at gmail dot com 2011-08-09 21:21:35 UTC --- (In reply to comment #41) (In reply to comment #39) Created attachment 24967 [details] Patch that recognizes addresses, zero-extended with AND Attached

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #33 from H.J. Lu hjl.tools at gmail dot com 2011-08-08 13:34:47 UTC --- (In reply to comment #32) (In reply to comment #31) (In reply to comment #29) Created attachment 24938 [details] WIP patch that exploits addr32.

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #34 from uros at gcc dot gnu.org 2011-08-08 14:59:22 UTC --- Author: uros Date: Mon Aug 8 14:59:19 2011 New Revision: 177566 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=177566 Log: PR target/49781 * config/i386/i386.c

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #35 from H.J. Lu hjl.tools at gmail dot com 2011-08-08 16:28:58 UTC --- It works much better now. But gcc.dg/torture/pr47744-2.c compiled with -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops still generates those leal:

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #36 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org 2011-08-08 16:33:10 UTC --- Author: hjl Date: Mon Aug 8 16:33:06 2011 New Revision: 177569 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=177569 Log: Add a testcase for PR

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-08 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #37 from Uros Bizjak ubizjak at gmail dot com 2011-08-08 17:16:44 UTC --- (In reply to comment #35) It works much better now. But gcc.dg/torture/pr47744-2.c compiled with -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-07 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #28 from Uros Bizjak ubizjak at gmail dot com 2011-08-07 07:31:06 UTC --- Reduced testcase: --cut here-- void test (__int128 *array, int idx, int off) { __int128 *dest = array [idx]; dest[0] += 1; dest[off] = 0; } --cut here--

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-07 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 Uros Bizjak ubizjak at gmail dot com changed: What|Removed |Added Attachment #24918|0 |1 is

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-07 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #30 from Uros Bizjak ubizjak at gmail dot com 2011-08-07 13:09:23 UTC --- (In reply to comment #29) Created attachment 24938 [details] WIP patch that exploits addr32. BTW: This patch also fixes following FAIL in [1]: FAIL:

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-07 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #31 from Uros Bizjak ubizjak at gmail dot com 2011-08-07 13:50:17 UTC --- (In reply to comment #29) Created attachment 24938 [details] WIP patch that exploits addr32. New version of patch for testing. Survives bootstrap + regtest

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added Status|ASSIGNED|UNCONFIRMED Ever

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-05 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #24 from Uros Bizjak ubizjak at gmail dot com 2011-08-05 06:25:55 UTC --- (In reply to comment #23) I still got FAIL: gcc.c-torture/execute/builtins/strcat.c compilation, -O1 (internal compiler error) movdi_internal_rex64 has

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-05 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #25 from Uros Bizjak ubizjak at gmail dot com 2011-08-05 19:01:44 UTC --- New revision of patch at [1]. [1] http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00642.html

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #26 from H.J. Lu hjl.tools at gmail dot com 2011-08-05 21:58:21 UTC --- (In reply to comment #25) New revision of patch at [1]. [1] http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00642.html It failed gcc.dg/torture/pr47744-2.c the

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-05 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #27 from Uros Bizjak ubizjak at gmail dot com 2011-08-05 22:01:31 UTC --- (In reply to comment #26) [1] http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00642.html It failed gcc.dg/torture/pr47744-2.c the same way as comment 8.

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #16 from Uros Bizjak ubizjak at gmail dot com 2011-08-04 18:49:32 UTC --- (In reply to comment #14) /export/build/gnu/gcc-x32-test/release/usr/gcc-4.7.0-x32/bin/gcc -mx32 -std=gnu99 -fgnu89-inline -O2-S testcase.c

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 Uros Bizjak ubizjak at gmail dot com changed: What|Removed |Added Attachment #24899|0 |1 is

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #18 from H.J. Lu hjl.tools at gmail dot com 2011-08-04 19:40:38 UTC --- (In reply to comment #17) Created attachment 24918 [details] WIP patch that exploits addr32. The patch ATM limits addr32 optimization to MODE_SIZE (op) =

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #19 from Uros Bizjak ubizjak at gmail dot com 2011-08-04 19:59:59 UTC --- (In reply to comment #18) (In reply to comment #17) Created attachment 24918 [details] WIP patch that exploits addr32. The patch ATM limits addr32

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #20 from Uros Bizjak ubizjak at gmail dot com 2011-08-04 20:09:48 UTC --- This is the missing part of predicates.md: Index: predicates.md === --- predicates.md

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #21 from H.J. Lu hjl.tools at gmail dot com 2011-08-04 21:00:11 UTC --- (In reply to comment #20) This is the missing part of predicates.md: It failed on 64bit bootstrap: [hjl@gnu-33 libgcc]$ cat /tmp/doit

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #22 from H.J. Lu hjl.tools at gmail dot com 2011-08-04 21:03:07 UTC --- I am testing: diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index ae1fa74..373e74b 100644 --- a/gcc/config/i386/predicates.md +++

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #23 from H.J. Lu hjl.tools at gmail dot com 2011-08-04 22:24:58 UTC --- I still got FAIL: gcc.c-torture/execute/builtins/strcat.c compilation, -O1 (internal compiler error) FAIL: gcc.c-torture/unsorted/xdi.c, -O1 (internal

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #8 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 14:10:25 UTC --- (In reply to comment #6) Created attachment 24899 [details] Proposed patch that exploits addr32. H.J., can you please test this patch on mx32. The patch

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #9 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 14:45:40 UTC --- (In reply to comment #8) Created attachment 24899 [details] Proposed patch that exploits addr32. H.J., can you please test this patch on mx32. The

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #10 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 15:01:10 UTC --- (In reply to comment #9) (In reply to comment #8) Created attachment 24899 [details] Proposed patch that exploits addr32. H.J., can you please

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #11 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 15:44:59 UTC --- (In reply to comment #10) This additional patch prevents zero_extend when we deal with wider-than-word-size moves. These moves need offsetable_operand, which

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #12 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 16:08:47 UTC --- (In reply to comment #11) gcc.dg/torture/pr47744-2.c compiled with -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops generates codes like

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #13 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 16:18:45 UTC --- (In reply to comment #10) This additional patch prevents zero_extend when we deal with wider-than-word-size moves. These moves need offsetable_operand, which

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #14 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 16:47:09 UTC --- Created attachment 24907 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24907 A testcase [hjl@gnu-33 delta]$

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #15 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 16:49:12 UTC --- (In reply to comment #13) (In reply to comment #10) This additional patch prevents zero_extend when we deal with wider-than-word-size moves. These moves

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #3 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 07:00:12 UTC --- Basically, we should allow ZERO_EXTEND in address: Trying 117 - 118: Failed to match this instruction: (set (mem:SI (zero_extend:DI (plus:SI (mult:SI (reg/v:SI

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #4 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 10:24:17 UTC --- (In reply to comment #0) Many lea insns can be combined with the load/store insn followed. I have a patch that generates addr32 prefix. The result: .file

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #5 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 10:27:35 UTC --- (In reply to comment #4) (In reply to comment #0) Many lea insns can be combined with the load/store insn followed. I have a patch that generates addr32

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #6 from Uros Bizjak ubizjak at gmail dot com 2011-08-03 10:30:39 UTC --- Created attachment 24899 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24899 Proposed patch that exploits addr32. H.J., can you please test this patch on

[Bug target/49781] [x32] Unnecessary lea in x32 mode

2011-08-03 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781 --- Comment #7 from H.J. Lu hjl.tools at gmail dot com 2011-08-03 13:26:20 UTC --- (In reply to comment #6) Created attachment 24899 [details] Proposed patch that exploits addr32. H.J., can you please test this patch on mx32. The patch