From 0c478921bdadb374b8c4b062c4812c659564b9cb Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Fri, 10 Nov 2000 11:43:43 +0000 Subject: [PATCH] Fix ia64 float extend splitter crash. From-SVN: r37365 --- gcc/ChangeLog | 5 +++++ gcc/config/ia64/ia64.md | 27 ++++++++++++++++++++++++--- gcc/toplev.c | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ff995ebf11..9625f27804b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,11 @@ * regrename.c (build_def_use): Mark contents of REG_INC notes as needing replacement. + * config/ia64/ia64.md (extendsfdf2, extendsftf2, extenddftf2): Emit + a no-op move if regs are equal. + * toplev.c (rest_of_compilation): Do the noop moves elimination pass + when calling jump after post-reload splitting. + 2000-11-09 Jan van Male * c-tree.texi: Fix typos. diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 5adc6462ab0..77418f217ac 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -1073,7 +1073,14 @@ getf.d %0 = %1" "reload_completed" [(set (match_dup 0) (float_extend:DF (match_dup 1)))] - "if (true_regnum (operands[0]) == true_regnum (operands[1])) DONE;" + " +{ + if (true_regnum (operands[0]) == true_regnum (operands[1])) + { + emit_insn (gen_movdi (pic_offset_table_rtx, pic_offset_table_rtx)); + DONE; + } +}" [(set_attr "type" "F,F,M,M,M,M")]) (define_insn_and_split "extendsftf2" @@ -1089,7 +1096,14 @@ stfe %0 = %1%P0" "reload_completed" [(set (match_dup 0) (float_extend:TF (match_dup 1)))] - "if (true_regnum (operands[0]) == true_regnum (operands[1])) DONE;" + " +{ + if (true_regnum (operands[0]) == true_regnum (operands[1])) + { + emit_insn (gen_movdi (pic_offset_table_rtx, pic_offset_table_rtx)); + DONE; + } +}" [(set_attr "type" "F,F,M,M,M")]) (define_insn_and_split "extenddftf2" @@ -1105,7 +1119,14 @@ stfe %0 = %1%P0" "reload_completed" [(set (match_dup 0) (float_extend:TF (match_dup 1)))] - "if (true_regnum (operands[0]) == true_regnum (operands[1])) DONE;" + " +{ + if (true_regnum (operands[0]) == true_regnum (operands[1])) + { + emit_insn (gen_movdi (pic_offset_table_rtx, pic_offset_table_rtx)); + DONE; + } +}" [(set_attr "type" "F,F,M,M,M")]) (define_insn "truncdfsf2" diff --git a/gcc/toplev.c b/gcc/toplev.c index aa8c4ba7796..1f46f35ee74 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3484,7 +3484,7 @@ rest_of_compilation (decl) open_dump_file (DFI_flow2, decl); jump_optimize (insns, !JUMP_CROSS_JUMP, - !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); + JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); find_basic_blocks (insns, max_reg_num (), rtl_dump_file); /* On some machines, the prologue and epilogue code, or parts thereof, -- 2.30.2