* [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-25 23:43 ` devurandom at gmx dot net
2011-01-03 18:24 ` devurandom at gmx dot net
` (16 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: devurandom at gmx dot net @ 2010-12-25 23:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #3 from devurandom at gmx dot net 2010-12-25 23:43:13 UTC ---
4.5.1 shows the same issue when building Clang 2.8.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
2010-12-25 23:43 ` [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct devurandom at gmx dot net
@ 2011-01-03 18:24 ` devurandom at gmx dot net
2011-01-03 19:59 ` [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] " rguenth at gcc dot gnu.org
` (15 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: devurandom at gmx dot net @ 2011-01-03 18:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #4 from devurandom at gmx dot net 2011-01-03 18:24:15 UTC ---
(In reply to comment #3)
> 4.5.1 shows the same issue when building Clang 2.8.
Persists with 4.5.2.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
2010-12-25 23:43 ` [Bug rtl-optimization/43653] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct devurandom at gmx dot net
2011-01-03 18:24 ` devurandom at gmx dot net
@ 2011-01-03 19:59 ` rguenth at gcc dot gnu.org
2011-01-03 20:00 ` rguenth at gcc dot gnu.org
` (14 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 19:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.6
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-01-03 19:59 ` [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] " rguenth at gcc dot gnu.org
@ 2011-01-03 20:00 ` rguenth at gcc dot gnu.org
2011-01-03 20:42 ` hjl.tools at gmail dot com
` (13 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 20:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE: in reload, at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-01-03 20:00 ` rguenth at gcc dot gnu.org
@ 2011-01-03 20:42 ` hjl.tools at gmail dot com
2011-02-15 17:51 ` [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE " law at redhat dot com
` (12 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-03 20:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-03 20:42:33 UTC ---
It is triggered by revision 124324:
http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00015.html
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-01-03 20:42 ` hjl.tools at gmail dot com
@ 2011-02-15 17:51 ` law at redhat dot com
2011-02-15 18:36 ` ubizjak at gmail dot com
` (11 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: law at redhat dot com @ 2011-02-15 17:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #6 from Jeffrey A. Law <law at redhat dot com> 2011-02-15 17:27:44 UTC ---
Working on trunk, still investigating if there was a patch designed to fix this
problem or if the bug has just gone latent.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2011-02-15 17:51 ` [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE " law at redhat dot com
@ 2011-02-15 18:36 ` ubizjak at gmail dot com
2011-02-15 19:21 ` law at redhat dot com
` (10 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2011-02-15 18:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-15 18:35:43 UTC ---
(In reply to comment #6)
> Working on trunk, still investigating if there was a patch designed to fix this
> problem or if the bug has just gone latent.
It still crashes for me (with the test from attachment 20315):
~/gcc-build/gcc/cc1 -O1 -ftree-vectorize -quiet pr43653.c
pr43653.c: In function ‘foo’:
pr43653.c:10:1: internal compiler error: in reload, at reload1.c:1059
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
~/gcc-build/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/home/uros/gcc-build/gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-svn/trunk/configure --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.6.0 20110214 (experimental) [trunk revision 170139] (GCC)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2011-02-15 18:36 ` ubizjak at gmail dot com
@ 2011-02-15 19:21 ` law at redhat dot com
2011-02-15 21:07 ` law at redhat dot com
` (9 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: law at redhat dot com @ 2011-02-15 19:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #8 from Jeffrey A. Law <law at redhat dot com> 2011-02-15 19:01:20 UTC ---
ah. Fails with -O1 -ftree-vectorize, works with -O2 -ftree-vectorize on trunk.
Appears that we allocate memory (via get_secondary_mem) after the point at
which we believe the size of frame should be fixed. This would tend to
indicate that during find_reloads we thought no secondary memory was needed,
but then later decided it was needed. That's clearly bad.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2011-02-15 19:21 ` law at redhat dot com
@ 2011-02-15 21:07 ` law at redhat dot com
2011-02-15 22:43 ` ubizjak at gmail dot com
` (8 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: law at redhat dot com @ 2011-02-15 21:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #9 from Jeffrey A. Law <law at redhat dot com> 2011-02-15 21:06:23 UTC ---
I think an x86 maintainer is going to need to take a look at this.
The problem as I see it is we're trying to use the address of a stack slot as a
vector initializer.
(insn 20 17 21 2 (set (reg:V2DI 74 [ vect_cst_.2 ])
(vec_duplicate:V2DI (reg/f:DI 20 frame))) j.c:4 1788 {*vec_dupv2di}
(expr_list:REG_EQUIV (vec_duplicate:V2DI (reg/f:DI 20 frame))
(nil)))
There's nothing inherently wrong with that. Eventually frame gets turned into
sp+offset like this:
(insn 20 17 21 2 (set (reg:V2DI 21 xmm0 [orig:74 vect_cst_.2 ] [74])
(vec_duplicate:V2DI (plus:DI (reg/f:DI 7 sp)
(const_int 392 [0x188])))) j.c:4 1788 {*vec_dupv2di}
(expr_list:REG_EQUIV (vec_duplicate:V2DI (plus:DI (reg/f:DI 7 sp)
(const_int 392 [0x188])))
(nil)))
This is a natural result of FP elimination and IMHO, we're still OK. That later
gets turned into:
(insn 20 17 21 2 (set (reg:V2DI 21 xmm0 [orig:74 vect_cst_.2 ] [74])
(vec_duplicate:V2DI (plus:DI (reg/f:DI 7 sp)
(mem/u/c/i:DI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0 S8
A64])))) j.c:4 1788 {*vec_dupv2di}
(expr_list:REG_EQUIV (vec_duplicate:V2DI (plus:DI (reg/f:DI 7 sp)
(const_int 392 [0x188])))
(nil)))
Dubious, but I understand why the code did this. We'll have the following
reload recorded:
Reload 0: reload_in (DI) = (plus:DI (reg/f:DI 7 sp)
(mem/u/c/i:DI
(symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0 S8 A64]))
reload_out (V2DI) = (reg:V2DI 21 xmm0 [orig:74 vect_cst_.2 ] [74])
SSE_REGS, RELOAD_OTHER (opnum = 0), can't combine
reload_in_reg: (plus:DI (reg/f:DI 7 sp)
(const_int 392 [0x188]))
reload_out_reg: (reg:V2DI 21 xmm0 [orig:74 vect_cst_.2 ] [74])
reload_reg_rtx: (reg:V2DI 22 xmm1)
Which simply isn't going to work and it's all downhill from there, including a
surprise secondary memory allocation which ultimately triggers the ICE.
I was able to hack things to work by enabling a secondary reload when copying
(plus (sp) (whatever)) into SSE_REGS, but that may not be the best solution.
Someone with more x86 internal knowledge should look at this.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2011-02-15 21:07 ` law at redhat dot com
@ 2011-02-15 22:43 ` ubizjak at gmail dot com
2011-02-16 5:08 ` law at redhat dot com
` (7 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2011-02-15 22:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-15 22:41:40 UTC ---
(In reply to comment #9)
> I think an x86 maintainer is going to need to take a look at this.
> Which simply isn't going to work and it's all downhill from there, including a
> surprise secondary memory allocation which ultimately triggers the ICE.
>
> I was able to hack things to work by enabling a secondary reload when copying
> (plus (sp) (whatever)) into SSE_REGS, but that may not be the best solution.
> Someone with more x86 internal knowledge should look at this.
Hm, indeed. SSE can't handle non-vector PLUS insn, so reload needs a bit of
help.
Following patch fixes the testcase:
Index: i386.c
===================================================================
--- i386.c (revision 170189)
+++ i386.c (working copy)
@@ -28313,6 +28313,11 @@ ix86_secondary_reload (bool in_p, rtx x,
return Q_REGS;
}
+ if (in_p && GET_CODE (x) == PLUS
+ && !VECTOR_MODE_P (mode)
+ && rclass == SSE_REGS)
+ return GENERAL_REGS;
+
return NO_REGS;
}
And generates:
movq .LC1(%rip), %rax
leaq (%rsp,%rax), %rax
movq %rax, -112(%rsp)
movq -112(%rsp), %xmm1
punpcklqdq %xmm1, %xmm1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2011-02-15 22:43 ` ubizjak at gmail dot com
@ 2011-02-16 5:08 ` law at redhat dot com
2011-02-16 8:32 ` [Bug target/43653] " ubizjak at gmail dot com
` (6 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: law at redhat dot com @ 2011-02-16 5:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> 2011-02-16 04:03:41 UTC ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/15/11 15:42, ubizjak at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
>
> --- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-15 22:41:40 UTC ---
> (In reply to comment #9)
>> I think an x86 maintainer is going to need to take a look at this.
>
>> Which simply isn't going to work and it's all downhill from there, including a
>> surprise secondary memory allocation which ultimately triggers the ICE.
>>
>> I was able to hack things to work by enabling a secondary reload when copying
>> (plus (sp) (whatever)) into SSE_REGS, but that may not be the best solution.
>> Someone with more x86 internal knowledge should look at this.
>
> Hm, indeed. SSE can't handle non-vector PLUS insn, so reload needs a bit of
> help.
It's unfortunate that reload decides to reload the constant offset, but
I suspect this kind of thing is exceedingly rare.
I'll let you own taking care of the PR since you've got a patch :-)
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNW0yQAAoJEBRtltQi2kC7VJsH/isQ/CjWMiBfrNea5JEqF6Hw
rc955z1QyN4584IfL2Vcl1KTwvMr5zy7FJTiWbybl812a24V5b7lFwGlgDmag3/6
59XY1RdEH4j+JLYuT+bEu3IBL4orqNZSHMxDRAqzeYGbzLj16KVJeS1+cNQV4iV5
foXZGrZ+1jr4saqpBCkpA0ecid5a4eX8vtMv2EmGWnW7LW/fy2w8casgn24iGio+
0HdMn8gBQuTGknU/u7yLf0ArS9/UBlrk8iE3VM9ssgz4oD4w3BJt0J5VMlBaqCpQ
G8BgZkfrmVCAvYcEiHpa6Cj30OmR3VeWN9IDu+jUWiZhSOluo5EDIxWCU8S1FBU=
=7vqY
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2011-02-16 5:08 ` law at redhat dot com
@ 2011-02-16 8:32 ` ubizjak at gmail dot com
2011-02-16 11:29 ` ubizjak at gmail dot com
` (5 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2011-02-16 8:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Component|rtl-optimization |target
AssignedTo|unassigned at gcc dot |ubizjak at gmail dot com
|gnu.org |
--- Comment #12 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-16 08:27:50 UTC ---
Target bug. I have a patch in testing.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2011-02-16 8:32 ` [Bug target/43653] " ubizjak at gmail dot com
@ 2011-02-16 11:29 ` ubizjak at gmail dot com
2011-02-17 8:34 ` uros at gcc dot gnu.org
` (4 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2011-02-16 11:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-02/txt00085.txt
--- Comment #13 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-16 11:21:03 UTC ---
Patch at [1].
[1] http://gcc.gnu.org/ml/gcc-patches/2011-02/txt00085.txt
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2011-02-16 11:29 ` ubizjak at gmail dot com
@ 2011-02-17 8:34 ` uros at gcc dot gnu.org
2011-02-17 20:26 ` law at redhat dot com
` (3 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu.org @ 2011-02-17 8:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #14 from uros at gcc dot gnu.org 2011-02-17 08:29:55 UTC ---
Author: uros
Date: Thu Feb 17 08:29:50 2011
New Revision: 170241
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170241
Log:
PR target/43653
* config/i386/i386.c (ix86_secondary_reload): Handle SSE
input reload with PLUS RTX.
testsuite/ChangeLog:
PR target/43653
* gcc.target/i386/pr43653.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr43653.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2011-02-17 8:34 ` uros at gcc dot gnu.org
@ 2011-02-17 20:26 ` law at redhat dot com
2011-02-17 21:34 ` ubizjak at gmail dot com
` (2 subsequent siblings)
17 siblings, 0 replies; 18+ messages in thread
From: law at redhat dot com @ 2011-02-17 20:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.3.6 |4.6.0
--- Comment #15 from Jeffrey A. Law <law at redhat dot com> 2011-02-17 19:46:39 UTC ---
Fixed by Uros's patch.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2011-02-17 20:26 ` law at redhat dot com
@ 2011-02-17 21:34 ` ubizjak at gmail dot com
2011-02-17 22:11 ` uros at gcc dot gnu.org
2011-02-17 23:23 ` uros at gcc dot gnu.org
17 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2011-02-17 21:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #16 from Uros Bizjak <ubizjak at gmail dot com> 2011-02-17 21:05:11 UTC ---
The assembly from -O1 -ftree-vectorize -msse3 shows another opportunity for
enhancement PR19398 (secondary reloads don't consider "m" alternatives):
.LFB0:
.cfi_startproc
subq $416, %rsp
.cfi_def_cfa_offset 424
movq .LC1(%rip), %rax
leaq (%rsp,%rax), %rax
movq %rax, -112(%rsp)
(*) movq -112(%rsp), %xmm1
(*) punpcklqdq %xmm1, %xmm1
movdqa %xmm1, %xmm0
leaq -104(%rsp), %rax
leaq 408(%rsp), %rdx
.L2:
Looking at the definition of
(define_insn "*vec_dupv2di_sse3"
[(set (match_operand:V2DI 0 "register_operand" "=x,x")
(vec_duplicate:V2DI
(match_operand:DI 1 "nonimmediate_operand" " 0,m")))]
"TARGET_SSE3"
"@
punpcklqdq\t%0, %0
movddup\t{%1, %0|%0, %1}"
[(set_attr "type" "sselog1")
(set_attr "mode" "TI,DF")])
the two insns marked with (*) can be substituted with the second alternative:
movddup -112(%rsp), %xmm1.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (15 preceding siblings ...)
2011-02-17 21:34 ` ubizjak at gmail dot com
@ 2011-02-17 22:11 ` uros at gcc dot gnu.org
2011-02-17 23:23 ` uros at gcc dot gnu.org
17 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu.org @ 2011-02-17 22:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #17 from uros at gcc dot gnu.org 2011-02-17 21:22:05 UTC ---
Author: uros
Date: Thu Feb 17 21:22:02 2011
New Revision: 170256
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170256
Log:
PR target/43653
* config/i386/i386.c (ix86_secondary_reload): Handle SSE
input reload with PLUS RTX.
testsuite/ChangeLog:
PR target/43653
* gcc.target/i386/pr43653.c: New test.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr43653.c
- copied unchanged from r170241,
trunk/gcc/testsuite/gcc.target/i386/pr43653.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/i386/i386.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/43653] [4.3/4.4/4.5/4.6 Regression] ICE at reload1.c:1188 with -O1 -ftree-vectorize and empty struct
[not found] <bug-43653-4@http.gcc.gnu.org/bugzilla/>
` (16 preceding siblings ...)
2011-02-17 22:11 ` uros at gcc dot gnu.org
@ 2011-02-17 23:23 ` uros at gcc dot gnu.org
17 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu.org @ 2011-02-17 23:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43653
--- Comment #18 from uros at gcc dot gnu.org 2011-02-17 22:10:40 UTC ---
Author: uros
Date: Thu Feb 17 22:10:37 2011
New Revision: 170258
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170258
Log:
PR target/43653
* config/i386/i386.c (ix86_secondary_reload): Handle SSE
input reload with PLUS RTX.
testsuite/ChangeLog:
PR target/43653
* gcc.target/i386/pr43653.c: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr43653.c
- copied unchanged from r170241,
trunk/gcc/testsuite/gcc.target/i386/pr43653.c
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/i386/i386.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 18+ messages in thread