Re: [PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-17 Thread Jakub Jelinek
On Tue, Apr 17, 2018 at 11:00:35AM +0200, Eric Botcazou wrote: > Right, they were originally alike, but someone you know very well changed it: > > 2013-12-17 Jakub Jelinek > > * expr.c (convert_modes): For SUBREG_PROMOTED_VAR_P use SUBREG_REG (x) > instead of x as last gen_lowpart

Re: [PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-17 Thread Jakub Jelinek
On Tue, Apr 17, 2018 at 09:32:31AM +0200, Eric Botcazou wrote: > > The following testcase FAILs, because cse_local sees > > (zero_extend:TI (subreg/s/v:DI (reg:TI ...) 0)) > > inside of REG_EQUAL note, and simplify-rtx.c attempts to optimize it. > > case ZERO_EXTEND: > > /* Check for a ze

Re: [PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-17 Thread Eric Botcazou
> Yes, convert_modes does this, on the other side e.g. convert_move a few > hundred lines above it doesn't: > if (GET_CODE (from) == SUBREG > && SUBREG_PROMOTED_VAR_P (from) > && is_a (to_mode, &to_int_mode) > && (GET_MODE_PRECISION (subreg_promoted_mode (from)) > >

Re: [PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-17 Thread Eric Botcazou
> The following testcase FAILs, because cse_local sees > (zero_extend:TI (subreg/s/v:DI (reg:TI ...) 0)) > inside of REG_EQUAL note, and simplify-rtx.c attempts to optimize it. > case ZERO_EXTEND: > /* Check for a zero extension of a subreg of a promoted > variable, where the pro

[PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-16 Thread Jakub Jelinek
Hi! The following testcase FAILs, because cse_local sees (zero_extend:TI (subreg/s/v:DI (reg:TI ...) 0)) inside of REG_EQUAL note, and simplify-rtx.c attempts to optimize it. case ZERO_EXTEND: /* Check for a zero extension of a subreg of a promoted variable, where the promotion