Re: Referencing a register in different modes

2024-09-12 Thread Stefan Schulze Frielinghaus via Gcc
On Fri, Aug 09, 2024 at 09:49:03AM +0200, Stefan Schulze Frielinghaus wrote: > On Thu, Aug 08, 2024 at 01:56:48PM -0600, Jeff Law wrote: > > > I haven't tested it extensively but it triggers at least for the current > > > case. > > > I would have loved to also print the insn but couldn't figure ou

Re: Referencing a register in different modes

2024-08-09 Thread Stefan Schulze Frielinghaus via Gcc
On Thu, Aug 08, 2024 at 01:56:48PM -0600, Jeff Law wrote: > > I haven't tested it extensively but it triggers at least for the current > > case. > > I would have loved to also print the insn but couldn't figure out how to ICE > > and stringify an insn. I will have a look at this tomorrow. Did yo

Re: Referencing a register in different modes

2024-08-08 Thread Jeff Law via Gcc
On 8/8/24 10:26 AM, Stefan Schulze Frielinghaus wrote: Since you installed this idea into my brain, I gave it a try. Maybe something along the lines: rtx orig_reg = regno_reg_rtx[regno]; machine_mode m1 = GET_MODE (orig_reg); machine_mode m2 = GE

Re: Referencing a register in different modes

2024-08-08 Thread Stefan Schulze Frielinghaus via Gcc
On Thu, Aug 08, 2024 at 07:57:43AM -0600, Jeff Law wrote: > > > On 8/8/24 6:26 AM, Stefan Schulze Frielinghaus wrote: > > On Thu, Aug 08, 2024 at 06:03:13AM -0600, Jeff Law wrote: > > > > > > > > > On 8/8/24 5:15 AM, Stefan Schulze Frielinghaus via Gcc wrote: > > > > > > > > > > > However `(r

Re: Referencing a register in different modes

2024-08-08 Thread Jeff Law via Gcc
On 8/8/24 6:26 AM, Stefan Schulze Frielinghaus wrote: On Thu, Aug 08, 2024 at 06:03:13AM -0600, Jeff Law wrote: On 8/8/24 5:15 AM, Stefan Schulze Frielinghaus via Gcc wrote: However `(reg:DI 61 [ MEM[(const union T *)p_2(D)] ])` referencing the same pseudo in a different mode is not subs

Re: Referencing a register in different modes

2024-08-08 Thread Stefan Schulze Frielinghaus via Gcc
On Thu, Aug 08, 2024 at 06:03:13AM -0600, Jeff Law wrote: > > > On 8/8/24 5:15 AM, Stefan Schulze Frielinghaus via Gcc wrote: > > > > > However `(reg:DI 61 [ MEM[(const union T *)p_2(D)] ])` referencing the > > same pseudo in a different mode is not substituted in insn 6 which > > leads in the

Re: Referencing a register in different modes

2024-08-08 Thread Jeff Law via Gcc
On 8/8/24 5:15 AM, Stefan Schulze Frielinghaus via Gcc wrote: However `(reg:DI 61 [ MEM[(const union T *)p_2(D)] ])` referencing the same pseudo in a different mode is not substituted in insn 6 which leads in the following to an error. The insn is emitted in s390_expand_insv() during There

Referencing a register in different modes

2024-08-08 Thread Stefan Schulze Frielinghaus via Gcc
Hi all, While trying to fix the failing test gcc.dg/torture/pr111821.c on s390 I'm stumbling across another problem. After ira we have (note 4 1 18 2 [bb 2] NOTE_INSN_BASIC_BLOCK) (insn 18 4 2 2 (set (reg:DI 66) (reg:DI 2 %r2 [ p ])) "/gcc/testsuite/gcc.dg/torture/pr111821.c":5:1 1503 {