OSDN Git Service

Fix ia64 float extend splitter crash.
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2000 11:43:43 +0000 (11:43 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2000 11:43:43 +0000 (11:43 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37365 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/ia64/ia64.md
gcc/toplev.c

index 4ff995e..9625f27 100644 (file)
@@ -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  <jan.vanmale@fenk.wau.nl>
 
         * c-tree.texi: Fix typos.
index 5adc646..77418f2 100644 (file)
    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"
    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"
    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"
index aa8c4ba..1f46f35 100644 (file)
@@ -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,