Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Uros Bizjak
On Tue, Jun 28, 2016 at 4:19 PM, Jakub Jelinek wrote: > On Tue, Jun 28, 2016 at 12:26:55PM +0200, Jakub Jelinek wrote: >> On Tue, Jun 28, 2016 at 12:09:51PM +0200, Uros Bizjak wrote: >> > > So, this patch instead changes ix86_expand_vector_move, so that >> > > for SUBREGs it forces the SUBREG_REG

Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Uros Bizjak
On Tue, Jun 28, 2016 at 12:26 PM, Jakub Jelinek wrote: > On Tue, Jun 28, 2016 at 12:09:51PM +0200, Uros Bizjak wrote: >> > So, this patch instead changes ix86_expand_vector_move, so that >> > for SUBREGs it forces the SUBREG_REG into memory (or register if >> > that fails, though I don't have a te

Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Jakub Jelinek
On Tue, Jun 28, 2016 at 12:26:55PM +0200, Jakub Jelinek wrote: > On Tue, Jun 28, 2016 at 12:09:51PM +0200, Uros Bizjak wrote: > > > So, this patch instead changes ix86_expand_vector_move, so that > > > for SUBREGs it forces the SUBREG_REG into memory (or register if > > > that fails, though I don't

Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Jakub Jelinek
On Tue, Jun 28, 2016 at 12:09:51PM +0200, Uros Bizjak wrote: > > So, this patch instead changes ix86_expand_vector_move, so that > > for SUBREGs it forces the SUBREG_REG into memory (or register if > > that fails, though I don't have a testcase for when that would happen), > > and just re-creates a

Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Uros Bizjak
On Tue, Jun 28, 2016 at 11:27 AM, Jakub Jelinek wrote: > On Tue, Jun 28, 2016 at 09:15:13AM +0200, Richard Biener wrote: >> I wonder why we can rely on the MODE_FLOAT case not seeing >> (subreg:DF (reg:V2DF ) 0) but have to handle >> (subreg:V1DF (reg:DF ...) 0) in the MODE_VECTOR case. > > Seems

[PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626, take 2)

2016-06-28 Thread Jakub Jelinek
On Tue, Jun 28, 2016 at 09:15:13AM +0200, Richard Biener wrote: > I wonder why we can rely on the MODE_FLOAT case not seeing > (subreg:DF (reg:V2DF ) 0) but have to handle > (subreg:V1DF (reg:DF ...) 0) in the MODE_VECTOR case. Seems all of force_const_mem is just unprepared to handle SUBREGs of C

Re: [PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626)

2016-06-28 Thread Richard Biener
On Mon, 27 Jun 2016, Jakub Jelinek wrote: > Hi! > > This patch is an attempt to fix ICE on the following testcase. > In output_constant_pool_2 we assume that for vector modes, force_const_mem > must be a CONST_VECTOR, but for the weirdo vector modes with single element > it could very well be jus

[PATCH] Fix ICE with V1DImode ctor (PR middle-end/71626)

2016-06-27 Thread Jakub Jelinek
Hi! This patch is an attempt to fix ICE on the following testcase. In output_constant_pool_2 we assume that for vector modes, force_const_mem must be a CONST_VECTOR, but for the weirdo vector modes with single element it could very well be just a SUBREG of some other constant. This isn't enough th