ira_destroy ();
- lra (ira_dump_file);
+ lra (ira_dump_file, internal_flag_ira_verbose);
/* ???!!! Move it before lra () when we use ira_reg_equiv in
LRA. */
vec_free (reg_equivs);
if (spill_p)
{
bitmap_clear (&failed_reload_pseudos);
+ lra_dump_insns_if_possible ("changed func after splitting hard regs");
return true;
}
bitmap_clear (&non_reload_pseudos);
lra_assert (df_regs_ever_live_p (hard_regno + j));
}
}
+ if (changed_p)
+ lra_dump_insns_if_possible ("changed func after local");
return changed_p;
}
bitmap_release (&invalid_invariant_regs);
bitmap_release (&check_only_regs);
free (usage_insns);
-
+ lra_dump_insns_if_possible ("func after inheritance");
timevar_pop (TV_LRA_INHERITANCE);
}
== get_regno (lra_reg_info[prev_sregno].restore_rtx))))
&& ! bitmap_bit_p (remove_pseudos, prev_sregno))
{
+ int restore_regno = get_regno (lra_reg_info[sregno].restore_rtx);
+ if (restore_regno < 0)
+ restore_regno = prev_sregno;
lra_assert (GET_MODE (SET_SRC (prev_set))
- == GET_MODE (regno_reg_rtx[sregno]));
+ == GET_MODE (regno_reg_rtx[restore_regno]));
/* Although we have a single set, the insn can
contain more one sregno register occurrence
as a source. Change all occurrences. */
lra_substitute_pseudo_within_insn (curr_insn, sregno,
- SET_SRC (prev_set),
+ regno_reg_rtx[restore_regno],
false);
/* As we are finishing with processing the insn
here, check the destination too as it might
EXECUTE_IF_SET_IN_BITMAP (&lra_split_regs, 0, regno, bi)
lra_reg_info[regno].restore_rtx = NULL_RTX;
change_p = undo_optional_reloads () || change_p;
+ if (change_p)
+ lra_dump_insns_if_possible ("changed func after undoing inheritance");
return change_p;
}
/* lra.cc: */
extern FILE *lra_dump_file;
+extern int lra_verbose;
extern bool lra_hard_reg_split_p;
extern bool lra_asm_error_p;
extern void lra_update_dups (lra_insn_recog_data_t, signed char *);
extern void lra_asm_insn_error (rtx_insn *insn);
+extern void lra_dump_insns (FILE *f);
+extern void lra_dump_insns_if_possible (const char *title);
+
extern void lra_process_new_insns (rtx_insn *, rtx_insn *, rtx_insn *,
const char *);
calculate_global_remat_bb_data ();
dump_candidates_and_remat_bb_data ();
result = do_remat ();
+ if (result)
+ lra_dump_insns_if_possible ("changed func after rematerialization");
all_cands.release ();
bitmap_clear (&temp_bitmap);
bitmap_clear (&subreg_regs);
return offset;
}
+/* Dump all func insns in a slim form. */
+void
+lra_dump_insns (FILE *f)
+{
+ dump_rtl_slim (f, get_insns (), NULL, -1, 0);
+}
+
+/* Dump all func insns in a slim form with TITLE when the dump file is open and
+ lra_verbose >=7. */
+void
+lra_dump_insns_if_possible (const char *title)
+{
+ if (lra_dump_file == NULL || lra_verbose < 7)
+ return;
+ fprintf (lra_dump_file, "%s:", title);
+ lra_dump_insns (lra_dump_file);
+}
+
/* Emit insns BEFORE before INSN and insns AFTER after INSN. Put the
insns onto the stack. Print about emitting the insns with
TITLE. */
/* File used for output of LRA debug information. */
FILE *lra_dump_file;
+/* How verbose should be the debug information. */
+int lra_verbose;
+
/* True if we split hard reg after the last constraint sub-pass. */
bool lra_hard_reg_split_p;
bool lra_simple_p;
/* Major LRA entry function. F is a file should be used to dump LRA
- debug info. */
+ debug info with given verbosity. */
void
-lra (FILE *f)
+lra (FILE *f, int verbose)
{
int i;
bool live_p, inserted_p;
lra_dump_file = f;
+ lra_verbose = verbose;
lra_asm_error_p = false;
lra_pmode_pseudo = gen_reg_rtx (Pmode);
}
extern rtx lra_eliminate_regs (rtx, machine_mode, rtx);
-extern void lra (FILE *);
+extern void lra (FILE *, int);
extern void lra_init_once (void);
extern void lra_finish_once (void);
--- /dev/null
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O -march=cascadelake -fwrapv" } */
+
+typedef _Decimal64 d64;
+int foo0_f128_0, foo0_ret, foo0_s64_0;
+_Complex float foo0_cf128_0;
+
+void
+foo (char u8_0, char s8_0, _Complex unsigned cu8_0, int cs32_0,
+ _Complex _Float16 cf16_0, _Complex int cf32_0, int d32_0,
+ _Decimal64 d64_0)
+{
+ cu8_0 *= (__int128) foo0_s64_0;
+ int cf32_1 = __builtin_ccosf (cu8_0);
+ __int128 u128_r =
+ foo0_f128_0 + (__int128) foo0_cf128_0 + (__int128) __imag__ foo0_cf128_0;
+ int u64_r = u128_r + foo0_s64_0 + d64_0;
+ int u32_r = u64_r + cs32_0 + cf32_0 + __imag__ cf32_0 + cf32_1 + d32_0;
+ short u16_r = u32_r + cf16_0 + __imag__ cf16_0;
+ char u8_r = u16_r + u8_0 + s8_0 + cu8_0 + __imag__ cu8_0;
+ foo0_ret = u8_r;
+}