* [Bug c++/64110] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
@ 2014-11-29 4:41 ` thiago at kde dot org
2014-11-29 7:17 ` thiago at kde dot org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 4:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #1 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34138
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34138&action=edit
Preprocessed sources for the build error
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
2014-11-29 4:41 ` [Bug c++/64110] " thiago at kde dot org
@ 2014-11-29 7:17 ` thiago at kde dot org
2014-11-29 7:20 ` thiago at kde dot org
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #2 from Thiago Macieira <thiago at kde dot org> ---
creduce reduced to the following testcase:
====
class A {
public:
short &m_fn1() { return ucs; }
short ucs;
};
class C {
public:
int m_fn2();
} a;
A *b;
C c;
void fn1(A p1) {
while (&a) {
int d = c.m_fn2();
for (int i; i < d; ++i)
b++->m_fn1() = p1.m_fn1();
}
}
====
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
2014-11-29 4:41 ` [Bug c++/64110] " thiago at kde dot org
2014-11-29 7:17 ` thiago at kde dot org
@ 2014-11-29 7:20 ` thiago at kde dot org
2014-11-29 13:02 ` [Bug c++/64110] [5 Regression] " hjl.tools at gmail dot com
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 7:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #3 from Thiago Macieira <thiago at kde dot org> ---
This reduced testcase starts (apparently) with an uninitialised int i, but the
same problem happens if you initialise to 0 (for (int i = 0; i < d; ++i))
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (2 preceding siblings ...)
2014-11-29 7:20 ` thiago at kde dot org
@ 2014-11-29 13:02 ` hjl.tools at gmail dot com
2014-12-01 12:17 ` jakub at gcc dot gnu.org
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 13:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-29
CC| |jakub at redhat dot com
Target Milestone|--- |5.0
Summary|ICE: Max. number of |[5 Regression] ICE: Max.
|generated reload insns per |number of generated reload
|insn is achieved (90) |insns per insn is achieved
| |(90)
Ever confirmed|0 |1
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
It was caused by r216541.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (3 preceding siblings ...)
2014-11-29 13:02 ` [Bug c++/64110] [5 Regression] " hjl.tools at gmail dot com
@ 2014-12-01 12:17 ` jakub at gcc dot gnu.org
2014-12-01 12:37 ` jakub at gcc dot gnu.org
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-01 12:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simplified testcase (-O3 -march=core-avx2):
int foo (void);
int a;
short *b;
void
bar (short x)
{
while (a--)
{
int i, j = foo ();
for (i = 0; i < j; ++i)
*b++ = x;
}
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (4 preceding siblings ...)
2014-12-01 12:17 ` jakub at gcc dot gnu.org
@ 2014-12-01 12:37 ` jakub at gcc dot gnu.org
2014-12-03 4:00 ` vmakarov at gcc dot gnu.org
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-01 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jakub at redhat dot com |vmakarov at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, before LRA we have:
(insn 27 36 28 2 (set (reg:SI 178 [ x ])
(reg:SI 5 di [ x ])) pr64110.C:7 90 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 5 di [ x ])
(nil)))
(insn 28 27 29 2 (set (reg/v:HI 177 [ x ])
(subreg:HI (reg:SI 178 [ x ]) 0)) pr64110.C:7 92 {*movhi_internal}
(expr_list:REG_DEAD (reg:SI 178 [ x ])
(nil)))
(note 29 28 89 2 NOTE_INSN_FUNCTION_BEG)
(insn 89 29 247 2 (set (reg:V16HI 214 [ vect_cst_.21 ])
(vec_duplicate:V16HI (reg/v:HI 177 [ x ]))) 4254 {*vec_dupv16hi}
(nil))
and *vec_dupv16hi is:
(define_insn "*vec_dup<mode>"
[(set (match_operand:AVX2_VEC_DUP_MODE 0 "register_operand" "=x,x,x")
(vec_duplicate:AVX2_VEC_DUP_MODE
(match_operand:<ssescalarmode> 1 "nonimmediate_operand" "m,x,!r")))]
"TARGET_AVX2"
Thus, I don't see a bug on the md side, I would have expected LRA to just
use (vec_duplicate:V16HI (reg/v:HI 5 di)) on the rhs (yes, it will be split
after reload).
But, during the ICE I see:
(insn 27 36 28 2 (set (reg:SI 178 [ x ])
(reg:SI 5 di [ x ])) pr64110.C:7 90 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 5 di [ x ])
(nil)))
(insn 28 27 29 2 (set (reg/v:HI 177 [ x ])
(subreg:HI (reg:SI 178 [ x ]) 0)) pr64110.C:7 92 {*movhi_internal}
(expr_list:REG_DEAD (reg:SI 178 [ x ])
(nil)))
(note 29 28 262 2 NOTE_INSN_FUNCTION_BEG)
(insn 262 29 263 2 (set (reg/v:HI 218 [orig:177 x ] [177])
(reg/v:HI 177 [ x ])) 92 {*movhi_internal}
(nil))
(insn 263 262 264 2 (set (reg/v:HI 219 [orig:177 x ] [177])
(reg/v:HI 218 [orig:177 x ] [177])) 92 {*movhi_internal}
(nil))
(insn 264 263 265 2 (set (reg/v:HI 220 [orig:177 x ] [177])
(reg/v:HI 219 [orig:177 x ] [177])) 92 {*movhi_internal}
(nil))
...
(repeated many times for pseudos 221, 222, ... 305)
(insn 350 349 351 2 (set (reg/v:HI 306 [orig:177 x ] [177])
(reg/v:HI 305 [orig:177 x ] [177])) 92 {*movhi_internal}
(nil))
(insn 351 350 89 2 (set (reg/v:HI 217 [orig:177 x ] [177])
(reg/v:HI 306 [orig:177 x ] [177])) 92 {*movhi_internal}
(nil))
(insn 89 351 261 2 (set (reg:V16HI 216 [orig:214 vect_cst_.21 ] [214])
(vec_duplicate:V16HI (reg/v:HI 217 [orig:177 x ] [177]))) 4254
{*vec_dupv16hi}
(nil))
Vlad, can you please have a look? Thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (5 preceding siblings ...)
2014-12-01 12:37 ` jakub at gcc dot gnu.org
@ 2014-12-03 4:00 ` vmakarov at gcc dot gnu.org
2014-12-03 9:35 ` [Bug rtl-optimization/64110] " mpolacek at gcc dot gnu.org
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-12-03 4:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
>
> Vlad, can you please have a look? Thanks.
I'll work on this. But the related code in LRA is very tricky. It can take a
few days to fix it and a lot of testing too.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (6 preceding siblings ...)
2014-12-03 4:00 ` vmakarov at gcc dot gnu.org
@ 2014-12-03 9:35 ` mpolacek at gcc dot gnu.org
2014-12-11 11:41 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-03 9:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Component|c++ |rtl-optimization
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Recateogrizing.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (7 preceding siblings ...)
2014-12-03 9:35 ` [Bug rtl-optimization/64110] " mpolacek at gcc dot gnu.org
@ 2014-12-11 11:41 ` rguenth at gcc dot gnu.org
2014-12-12 20:11 ` vmakarov at gcc dot gnu.org
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-11 11:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ra
Target| |x86_64-*-*
Priority|P3 |P1
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (8 preceding siblings ...)
2014-12-11 11:41 ` rguenth at gcc dot gnu.org
@ 2014-12-12 20:11 ` vmakarov at gcc dot gnu.org
2014-12-17 3:31 ` hjl.tools at gmail dot com
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-12-12 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #9 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Fri Dec 12 20:11:10 2014
New Revision: 218688
URL: https://gcc.gnu.org/viewcvs?rev=218688&root=gcc&view=rev
Log:
2014-12-12 Vladimir Makarov <vmakarov@redhat.com>
PR target/64110
* lra-constraints.c (process_alt_operands): Refuse alternative
when reload pseudo of given class can not hold value of given
mode.
2014-12-12 Vladimir Makarov <vmakarov@redhat.com>
PR target/64110
* gcc.target/i386/pr64110.c: New.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr64110.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-constraints.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (9 preceding siblings ...)
2014-12-12 20:11 ` vmakarov at gcc dot gnu.org
@ 2014-12-17 3:31 ` hjl.tools at gmail dot com
2014-12-17 8:36 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-17 3:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
It fails with -m32:
[hjl@gnu-6 gcc]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/pr64110.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -march=core-avx2 -S
-m32 -o pr64110.s
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/pr64110.c: In function
\u2018bar\u2019:
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/pr64110.c:17:1:
internal compiler error: Max. number of generated reload insns per insn is
achieved (90)
0xb65d03 lra_constraints(bool)
/export/gnu/import/git/gcc/gcc/lra-constraints.c:4256
0xb52ceb lra(_IO_FILE*)
/export/gnu/import/git/gcc/gcc/lra.c:2277
0xb03357 do_reload
/export/gnu/import/git/gcc/gcc/ira.c:5402
0xb03704 execute
/export/gnu/import/git/gcc/gcc/ira.c:5573
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 gcc]$
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (10 preceding siblings ...)
2014-12-17 3:31 ` hjl.tools at gmail dot com
@ 2014-12-17 8:36 ` jakub at gcc dot gnu.org
2014-12-17 21:30 ` vmakarov at gcc dot gnu.org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-17 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looking at the generated assembly, I see there:
movw %di, -80(%rbp)
vpbroadcastw -80(%rbp), %ymm1
vmovdqa %ymm1, -80(%rbp)
I'd have expected
vmovd %edi, %xmm1
vpbroadcastw %xmm1, %ymm1
vmovdqa %ymm1, -80(%rbp)
Is there some bug in the *vec_dupv16hi pattern that LRA can't use the !r
alternative? %di should be valid nonimmediate_operand in HImode. For e.g.
typedef unsigned short V __attribute__((vector_size (32)));
V foo (unsigned short x)
{
return (V) { x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x };
}
we emit what I expect. In the latter case, at *.ira we have:
(insn 2 5 3 2 (set (reg:SI 90 [ x ])
(reg:SI 5 di [ x ])) pr64110-4.c:3 90 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 5 di [ x ])
(nil)))
(note 3 2 4 2 NOTE_INSN_DELETED)
(note 4 3 7 2 NOTE_INSN_FUNCTION_BEG)
(insn 7 4 12 2 (set (reg:V16HI 92 [ D.2291 ])
(vec_duplicate:V16HI (subreg:HI (reg:SI 90 [ x ]) 0))) pr64110-4.c:4
4233 {*vec_dupv16hi}
(expr_list:REG_DEAD (reg:SI 90 [ x ])
(nil)))
and in the former case we have:
(insn 27 36 28 2 (set (reg:SI 178 [ x ])
(reg:SI 5 di [ x ])) pr64110.c:10 90 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 5 di [ x ])
(nil)))
(insn 28 27 29 2 (set (reg/v:HI 177 [ x ])
(subreg:HI (reg:SI 178 [ x ]) 0)) pr64110.c:10 92 {*movhi_internal}
(expr_list:REG_DEAD (reg:SI 178 [ x ])
(nil)))
(note 29 28 89 2 NOTE_INSN_FUNCTION_BEG)
(insn 89 29 247 2 (set (reg:V16HI 214 [ vect_cst_.21 ])
(vec_duplicate:V16HI (reg/v:HI 177 [ x ]))) 4233 {*vec_dupv16hi}
(nil))
which isn't that much different...
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (11 preceding siblings ...)
2014-12-17 8:36 ` jakub at gcc dot gnu.org
@ 2014-12-17 21:30 ` vmakarov at gcc dot gnu.org
2014-12-17 21:37 ` vmakarov at gcc dot gnu.org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-12-17 21:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #12 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
I've just fixed the problem reported by H.J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (12 preceding siblings ...)
2014-12-17 21:30 ` vmakarov at gcc dot gnu.org
@ 2014-12-17 21:37 ` vmakarov at gcc dot gnu.org
2014-12-17 22:55 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-12-17 21:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #13 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #11)
> Looking at the generated assembly, I see there:
> movw %di, -80(%rbp)
> vpbroadcastw -80(%rbp), %ymm1
> vmovdqa %ymm1, -80(%rbp)
> I'd have expected
> vmovd %edi, %xmm1
> vpbroadcastw %xmm1, %ymm1
> vmovdqa %ymm1, -80(%rbp)
> Is there some bug in the *vec_dupv16hi pattern that LRA can't use the !r
> alternative? %di should be valid nonimmediate_operand in HImode. For e.g.
I know about the problem. It is coming from a different treatment of ! in LRA
and reload. I am going to work on this but as the fix would be in very
sensitive LRA part. I am afraid to fix it before my vacation. So probably it
will be solved only in January.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (13 preceding siblings ...)
2014-12-17 21:37 ` vmakarov at gcc dot gnu.org
@ 2014-12-17 22:55 ` jakub at gcc dot gnu.org
2015-01-09 16:24 ` vmakarov at gcc dot gnu.org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-17 22:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #13)
> (In reply to Jakub Jelinek from comment #11)
> > Looking at the generated assembly, I see there:
> > movw %di, -80(%rbp)
> > vpbroadcastw -80(%rbp), %ymm1
> > vmovdqa %ymm1, -80(%rbp)
> > I'd have expected
> > vmovd %edi, %xmm1
> > vpbroadcastw %xmm1, %ymm1
> > vmovdqa %ymm1, -80(%rbp)
> > Is there some bug in the *vec_dupv16hi pattern that LRA can't use the !r
> > alternative? %di should be valid nonimmediate_operand in HImode. For e.g.
>
> I know about the problem. It is coming from a different treatment of ! in
> LRA and reload. I am going to work on this but as the fix would be in very
> sensitive LRA part. I am afraid to fix it before my vacation. So probably
> it will be solved only in January.
Np, and thanks a lot.
The ! has been added by me for PR63594, so it isn't there from the era when
i?86 backend was using reload. If there is a better way to express that RA
should prefer to use memory or xmm register and only use r constraint if it
already is in a r register and doesn't need to be reloaded, I can use that.
Whether it is ?, ??? or something else. ! description in gcc docs just fitted
most what I wanted...
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (14 preceding siblings ...)
2014-12-17 22:55 ` jakub at gcc dot gnu.org
@ 2015-01-09 16:24 ` vmakarov at gcc dot gnu.org
2015-01-09 16:36 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-01-09 16:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #15 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #14)
> (In reply to Vladimir Makarov from comment #13)
> > (In reply to Jakub Jelinek from comment #11)
> > > Looking at the generated assembly, I see there:
> > > movw %di, -80(%rbp)
> > > vpbroadcastw -80(%rbp), %ymm1
> > > vmovdqa %ymm1, -80(%rbp)
> > > I'd have expected
> > > vmovd %edi, %xmm1
> > > vpbroadcastw %xmm1, %ymm1
> > > vmovdqa %ymm1, -80(%rbp)
> > > Is there some bug in the *vec_dupv16hi pattern that LRA can't use the !r
> > > alternative? %di should be valid nonimmediate_operand in HImode. For e.g.
> >
> > I know about the problem. It is coming from a different treatment of ! in
> > LRA and reload. I am going to work on this but as the fix would be in very
> > sensitive LRA part. I am afraid to fix it before my vacation. So probably
> > it will be solved only in January.
>
> Np, and thanks a lot.
>
> The ! has been added by me for PR63594, so it isn't there from the era when
> i?86 backend was using reload. If there is a better way to express that RA
> should prefer to use memory or xmm register and only use r constraint if it
> already is in a r register and doesn't need to be reloaded, I can use that.
> Whether it is ?, ??? or something else. ! description in gcc docs just
> fitted most what I wanted...
Jakub, I've checked this particular test and LRA works in the same way as
reload and as specified in the GCC documentation which mainly says that '!' is
ignored only when *all* operands satisfy the alternative constraints. In this
case there is one reload therefore alternative with '!r' is rejected. I
understand that for this insn the desirable behaviour is to reject alternative
only when operand with '!r' needs a reload.
I could implement such functionality. The following unreserved special
characters can be used as such modifier with the new functionality:
@ $ ^ -
What character would you prefer, Jakub?
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (15 preceding siblings ...)
2015-01-09 16:24 ` vmakarov at gcc dot gnu.org
@ 2015-01-09 16:36 ` jakub at gcc dot gnu.org
2015-01-09 16:48 ` law at redhat dot com
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-09 16:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #15)
> Jakub, I've checked this particular test and LRA works in the same way as
> reload and as specified in the GCC documentation which mainly says that '!'
> is ignored only when *all* operands satisfy the alternative constraints. In
> this case there is one reload therefore alternative with '!r' is rejected.
> I understand that for this insn the desirable behaviour is to reject
> alternative only when operand with '!r' needs a reload.
>
> I could implement such functionality. The following unreserved special
> characters can be used as such modifier with the new functionality:
> @ $ ^ -
>
> What character would you prefer, Jakub?
No strong opinion, perhaps @ ? Jeff, what would you prefer?
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (16 preceding siblings ...)
2015-01-09 16:36 ` jakub at gcc dot gnu.org
@ 2015-01-09 16:48 ` law at redhat dot com
2015-01-15 20:27 ` vmakarov at gcc dot gnu.org
2015-01-20 21:57 ` law at redhat dot com
19 siblings, 0 replies; 21+ messages in thread
From: law at redhat dot com @ 2015-01-09 16:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #17 from Jeffrey A. Law <law at redhat dot com> ---
No strong opinions. I wouldn't be surprised if we find other uses for this
capability, so pick one and run with it.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (17 preceding siblings ...)
2015-01-09 16:48 ` law at redhat dot com
@ 2015-01-15 20:27 ` vmakarov at gcc dot gnu.org
2015-01-20 21:57 ` law at redhat dot com
19 siblings, 0 replies; 21+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2015-01-15 20:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
--- Comment #18 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Thu Jan 15 20:26:19 2015
New Revision: 219683
URL: https://gcc.gnu.org/viewcvs?rev=219683&root=gcc&view=rev
Log:
2015-01-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/64110
* stmt.c (parse_output_constraint): Process '^' and '$'.
(parse_input_constraint): Ditto.
* lra-constraints.c (process_alt_operands): Process the new
constraints.
* ira-costs.c (record_reg_classes): Process the new constraint
'^'.
* genoutput.c (indep_constraints): Add '^' and '$'.
* config/i386/sse.md (*vec_dup<mode>): Use '$' instead of '!'.
* doc/md.texi: Add description of the new constraints.
2015-01-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/64110
* gcc.target/i386/pr64110.c: Add scan-assembler.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/doc/md.texi
trunk/gcc/genoutput.c
trunk/gcc/ira-costs.c
trunk/gcc/lra-constraints.c
trunk/gcc/stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr64110.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug rtl-optimization/64110] [5 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)
2014-11-29 4:25 [Bug c++/64110] New: ICE: Max. number of generated reload insns per insn is achieved (90) thiago at kde dot org
` (18 preceding siblings ...)
2015-01-15 20:27 ` vmakarov at gcc dot gnu.org
@ 2015-01-20 21:57 ` law at redhat dot com
19 siblings, 0 replies; 21+ messages in thread
From: law at redhat dot com @ 2015-01-20 21:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64110
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #19 from Jeffrey A. Law <law at redhat dot com> ---
Vlad fixed this on the trunk.
^ permalink raw reply [flat|nested] 21+ messages in thread