avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] ICE in push_reload for avr


From: Pitchumani Sivanupandi
Subject: [avr-gcc-list] ICE in push_reload for avr
Date: Tue, 15 Mar 2016 14:10:42 +0530
User-agent: Mutt/1.5.24 (2015-08-30)

Hi Johann,

There is an ICE in push_reload for AVR target which is very similar to
PR64452. Attached the test case (options: -mmcu=atmega1280 -O1).

PR64452's fix makes the virtual reloads in one chunk for push operation.
What is the significance to address the virtuals only in range of
FIRST_VIRTUAL_REGISTER to LAST_VIRTUAL_REGISTER?

I tried below split to load the symbol reference to register before
doing the arithmetic on it. This avoids the defect, but it is un-optimal
and may split RTLs for non-push operations also.

(define_split
  [(set (match_operand:HI 0 "register_operand" "")
        (const:HI (plus:HI (match_operand:HI 1 "symbol_ref_operand" "")
                      (match_operand:ALL2 2 "immediate_operand" ""))))]
  "!reload_completed
   && (REGNO (operands[0]) >= FIRST_VIRTUAL_REGISTER)"
  [(set (match_dup 0)
        (match_dup 1))
   (set (match_dup 0)
        (plus:HI (match_dup 0)
                 (match_dup 2)))])

Any suggestions?

Regards,
Pitchumani

Attachment: ice-reload-avr.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]