LRA for avr: help with FP and elimination

2023-07-13 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, I've been spending some (spare) time checking what it would take to make LRA work for the avr target. Right after I removed the TARGET_LRA_P hook disabling LRA, building libgcc failed with a weird ICE. On the avr, the stack pointer (SP) is not used to access stack slots - TARGET_CAN

Re: LRA for avr: help with FP and elimination

2023-07-17 Thread SenthilKumar.Selvaraj--- via Gcc
On Fri, 2023-07-14 at 09:29 -0400, Vladimir Makarov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 7/13/23 05:27, SenthilKumar.Selvaraj--- via Gcc wrote: > > Hi, > > > >I've been spending some

LRA for avr: Handling hard regs set directly at expand

2023-07-17 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, The avr target has a bunch of patterns that directly set hard regs at expand time, like so (define_expand "cpymemhi" [(parallel [(set (match_operand:BLK 0 "memory_operand" "") (match_operand:BLK 1 "memory_operand" "")) (use (match_operand:HI 2 "const_int_

LRA for avr: Clobber with match_dup

2023-07-20 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, The avr backend has this define_insn_and_split (define_insn_and_split "*tablejump_split" [(set (pc) (unspec:HI [(match_operand:HI 0 "register_operand" "!z,*r,z")] UNSPEC_INDEX_JMP)) (use (label_ref (match_operand 1 "" ""))) (clobber (match_dup 0)) (clob

Re: LRA for avr: Handling hard regs set directly at expand

2023-07-27 Thread SenthilKumar.Selvaraj--- via Gcc
On Thu, 2023-07-27 at 15:11 +0200, Georg-Johann Lay wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Am 17.07.23 um 13:33 schrieb SenthilKumar.Selvaraj--- via Gcc: > > Hi, > > > >The avr target has a b

Re: LRA for avr: Handling hard regs set directly at expand

2023-08-02 Thread SenthilKumar.Selvaraj--- via Gcc
On Wed, 2023-08-02 at 12:54 -0400, Vladimir Makarov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 7/17/23 07:33, senthilkumar.selva...@microchip.com wrote: > > Hi, > > > >The avr target has a bunch of patterns that directly set h

LRA for avr: Arithmetic on stack pointer

2023-08-09 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, After turning on FP -> SP elimination after Vlad fixed an elimination issue in https://gcc.gnu.org/git?p=gcc.git;a=commit;h=2971ff7b1d564ac04b537d907c70e6093af70832, I'm now running into reload failure if arithmetic is done on SP. For a call to a vararg functions, the avr target push

Re: LRA for avr: help with FP and elimination

2023-08-10 Thread SenthilKumar.Selvaraj--- via Gcc
On Tue, 2023-07-18 at 11:04 -0400, Vladimir Makarov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 7/17/23 03:17, senthilkumar.selva...@microchip.com wrote: > > On Fri, 2023-07-14 at 09:29 -0400, Vladimir Makarov wrote: > > > If you se

LRA for avr: Clear mem rtx when resizing stack slots?

2023-09-01 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, The below (slightly) reduced test-case from gcc.c-torture/execute/simd-2.c produces an execution failure for avr. typedef short __attribute__((vector_size (16))) vecint; vecint i = { 150, 100, 150, 200, 0, 0, 0, 0 }; vecint j = { 10, 13, 20, 30, 1, 1, 1, 1 }; vecint k; union { vecint

LRA for avr: Maintain live range info for pseudos assigned to FP?

2023-09-07 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, One more execution failure for the avr target, this time from gcc.c-torture/execute/bitfld-3.c. Steps to reproduce Enable LRA in avr.cc by removing TARGET_LRA_P hook, build with $ make all-host && make install-host and then $ avr-gcc gcc/testsuite/gcc.c-torture/execute/bitfld-3

Re: LRA for avr: Maintain live range info for pseudos assigned to FP?

2023-11-19 Thread SenthilKumar.Selvaraj--- via Gcc
On Thu, 2023-10-05 at 15:33 -0400, Vladimir Makarov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 9/7/23 07:21, senthilkumar.selva...@microchip.com wrote: > > Hi, > > > >One more execution failure for the avr target, this time fr