ICE in push_reload for avr

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ICE in push_reload for avr

Pitchumani Sivanupandi
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

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

ice-reload-avr.c (243 bytes) Download Attachment
Loading...