[Darwin,committed] Update machopic_legitimize_pic_address.
diff mbox series

Message ID 167C9481-B68F-47EB-94C3-49CF5DCB781C@sandoe.co.uk
State New
Headers show
Series
  • [Darwin,committed] Update machopic_legitimize_pic_address.
Related show

Commit Message

Iain Sandoe Sept. 21, 2019, 7:51 p.m. UTC
Some changes were missed here in the transition to LRA.  The Darwin
archs are all using LRA now.

tested on i686-darwin9, x86_64-darwin16, 
applied to mainline
thanks
Iain

gcc/ChangeLog:

2019-09-21  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.c (machopic_legitimize_pic_address): Check
	for lra not reload.

Patch
diff mbox series

diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index e1017befaf..3e4bbffc92 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -842,7 +842,7 @@  machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
        {
          if (reg == 0)
            {
-             gcc_assert (!reload_in_progress);
+             gcc_assert (!lra_in_progress);
              reg = gen_reg_rtx (Pmode);
            }
 
@@ -926,7 +926,7 @@  machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
              emit_use (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
 #endif
 
-             if (reload_in_progress)
+             if (lra_in_progress)
                df_set_regs_ever_live (REGNO (pic), true);
              pic_ref = gen_rtx_PLUS (Pmode, pic,
                                      machopic_gen_offset (XEXP (orig, 0)));
@@ -950,7 +950,7 @@  machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
 
              if (reg == 0)
                {
-                 gcc_assert (!reload_in_progress);
+                 gcc_assert (!lra_in_progress);
                  reg = gen_reg_rtx (Pmode);
                }
 
@@ -996,7 +996,7 @@  machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
 #if 0
                  emit_use (pic_offset_table_rtx);
 #endif
-                 if (reload_in_progress)
+                 if (lra_in_progress)
                    df_set_regs_ever_live (REGNO (pic), true);
                  pic_ref = gen_rtx_PLUS (Pmode,
                                          pic,