From 52bfa7151243b0dfebc3b978e733679e27b395b7 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Tue, 12 Apr 2016 12:20:37 -0400
Subject: [PATCH 065/111] FIXME: WIP on DejaGnu support

---
 gcc/rtl/lang.opt                                   | 32 +++++++++
 gcc/rtl/rtl-frontend.c                             | 42 ++++++++---
 gcc/testsuite/lib/rtl-dg.exp                       | 59 ++++++++++++++++
 .../rtl.dg/roundtrip/note-insn-basic-block.rtl     |  1 +
 .../rtl.dg/roundtrip/note-insn-deleted.rtl         |  1 +
 gcc/testsuite/rtl.dg/roundtrip/roundtrip.exp       | 81 ++++++++++++++++++++++
 .../rtl.dg/roundtrip/test-loop.cleaned.rtl         | 75 ++++++++++++++++++++
 gcc/testsuite/rtl.dg/rtl.exp                       | 43 ++++++++++++
 gcc/testsuite/rtl.dg/test-loop.cleaned.rtl         | 75 ++++++++++++++++++++
 test-loop.cleaned.rtl                              | 75 --------------------
 10 files changed, 401 insertions(+), 83 deletions(-)
 create mode 100644 gcc/rtl/lang.opt
 create mode 100644 gcc/testsuite/lib/rtl-dg.exp
 create mode 100644 gcc/testsuite/rtl.dg/roundtrip/note-insn-basic-block.rtl
 create mode 100644 gcc/testsuite/rtl.dg/roundtrip/note-insn-deleted.rtl
 create mode 100644 gcc/testsuite/rtl.dg/roundtrip/roundtrip.exp
 create mode 100644 gcc/testsuite/rtl.dg/roundtrip/test-loop.cleaned.rtl
 create mode 100644 gcc/testsuite/rtl.dg/rtl.exp
 create mode 100644 gcc/testsuite/rtl.dg/test-loop.cleaned.rtl
 delete mode 100644 test-loop.cleaned.rtl

diff --git a/gcc/rtl/lang.opt b/gcc/rtl/lang.opt
new file mode 100644
index 0000000..27f9683
--- /dev/null
+++ b/gcc/rtl/lang.opt
@@ -0,0 +1,32 @@
+; lang.opt -- Options for the gcc RTL front end.
+
+; Copyright (C) 2016 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+; 
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+; for more details.
+; 
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+; See the GCC internals manual for a description of this file's format.
+
+; Please try to keep this file in ASCII collating order.
+
+Language
+RTL
+
+froundtrip=
+RTL Joined RejectNegative
+FIXME
+
+; This comment is to ensure we retain the blank line above.
diff --git a/gcc/rtl/rtl-frontend.c b/gcc/rtl/rtl-frontend.c
index bf0a7ab..3bcf0dc 100644
--- a/gcc/rtl/rtl-frontend.c
+++ b/gcc/rtl/rtl-frontend.c
@@ -116,7 +116,7 @@ rtl_langhook_init (void)
 static unsigned int
 rtl_langhook_option_lang_mask (void)
 {
-  return CL_Go;
+  return CL_RTL;
 }
 
 /* Initialize the options structure.  */
@@ -157,6 +157,8 @@ rtl_langhook_init_options_struct (struct gcc_options */*opts*/)
 #endif
 }
 
+static const char *roundtrip_filename = NULL;
+
 static bool
 rtl_langhook_handle_option (
     size_t scode ATTRIBUTE_UNUSED,
@@ -166,7 +168,17 @@ rtl_langhook_handle_option (
     location_t loc ATTRIBUTE_UNUSED,
     const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
 {
-  /* FIXME: pretend to handle options.  */
+  enum opt_code code = (enum opt_code) scode;
+
+  switch (code)
+    {
+    case OPT_froundtrip_:
+      roundtrip_filename = xstrdup (arg);
+      break;
+
+    default:
+      break;
+    }
   return true;
 }
 
@@ -496,8 +508,11 @@ function_reader::handle_unknown_directive (file_location start_loc,
   location_t end_loc = get_current_location ();
   unread_char (c);
   location_t insn_loc = make_location (start_loc, start_loc, end_loc);
-  inform (insn_loc, "input insn");
-  debug (insn);
+  if (0)
+    {
+      inform (insn_loc, "input insn");
+      debug (insn);
+    }
   m_insns_by_uid.put (INSN_UID (insn), insn);
 }
 
@@ -695,9 +710,20 @@ rtl_langhook_parse_file (void)
   reader.create_function ();
   reader.apply_fixups ();
 
-  FILE *out = fopen ("/tmp/roundtrip.rtl", "w");
-  print_rtl_with_bb (out, reader.get_first_insn (), 1024);
-  fclose (out);
+  /* If -froundtrip=FILENAME was provided, immediately dump the
+     result, so that the testsuite can compare it against the
+     input dump.  */
+  if (roundtrip_filename)
+    {
+      FILE *out = fopen (roundtrip_filename, "w");
+      if (out)
+	{
+	  print_rtl_with_bb (out, reader.get_first_insn (), 1024);
+	  fclose (out);
+	}
+      else
+	error ("unable to open %qs for -froundtrip" , roundtrip_filename);
+    }
 
   /*
     Run just one pass e.g. pass_instantiate_virtual_regs
@@ -709,7 +735,7 @@ rtl_langhook_parse_file (void)
   pass->execute (cfun);
   current_function_decl = NULL;
 
-  out = fopen ("/tmp/after-pass.rtl", "w");
+  FILE *out = fopen ("/tmp/after-pass.rtl", "w");
   print_rtl_with_bb (out, reader.get_first_insn (), 1024);
   fclose (out);
 }
diff --git a/gcc/testsuite/lib/rtl-dg.exp b/gcc/testsuite/lib/rtl-dg.exp
new file mode 100644
index 0000000..8652d35
--- /dev/null
+++ b/gcc/testsuite/lib/rtl-dg.exp
@@ -0,0 +1,59 @@
+#   Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Define rtl callbacks for dg.exp.
+
+# Load support procs.
+load_lib gcc-defs.exp
+
+proc rtl_target_compile { source dest type options } {
+    set result [target_compile $source $dest $type $options]
+    return $result
+}
+
+load_lib gcc-dg.exp
+
+proc rtl-dg-test { prog do_what extra_tool_flags } {
+    return [gcc-dg-test-1 rtl_target_compile $prog $do_what $extra_tool_flags]
+}
+
+
+proc rtl-dg-prune { system text } {
+    return [gcc-dg-prune $system $text]
+}
+
+# Modified dg-runtest that runs tests in both C++98 and C++11 modes
+# unless they specifically specify one or the other.
+proc rtl-dg-runtest { testcases default-extra-flags } {
+    global runtests
+
+    foreach test $testcases {
+	# look if this is dg-do-run test, in which case
+	# we cycle through the option list, otherwise we don't
+	if [expr [search_for $test "dg-do run"]] {
+	    set option_list $TORTURE_OPTIONS
+	} else {
+	    set option_list [list { -O } ]
+	}
+
+	set nshort [file tail [file dirname $test]]/[file tail $test]
+
+	foreach flags $option_list {
+	    verbose "Testing $nshort, $flags" 1
+	    dg-test $test $flags ${default-extra-flags}
+	}
+    }
+}
diff --git a/gcc/testsuite/rtl.dg/roundtrip/note-insn-basic-block.rtl b/gcc/testsuite/rtl.dg/roundtrip/note-insn-basic-block.rtl
new file mode 100644
index 0000000..8e535a1
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/roundtrip/note-insn-basic-block.rtl
@@ -0,0 +1 @@
+(note 1 0 0 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
diff --git a/gcc/testsuite/rtl.dg/roundtrip/note-insn-deleted.rtl b/gcc/testsuite/rtl.dg/roundtrip/note-insn-deleted.rtl
new file mode 100644
index 0000000..e63997f
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/roundtrip/note-insn-deleted.rtl
@@ -0,0 +1 @@
+(note 1 0 0 (nil) NOTE_INSN_DELETED)
diff --git a/gcc/testsuite/rtl.dg/roundtrip/roundtrip.exp b/gcc/testsuite/rtl.dg/roundtrip/roundtrip.exp
new file mode 100644
index 0000000..1d8c2bf
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/roundtrip/roundtrip.exp
@@ -0,0 +1,81 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Verify that all of the .rtl files in this directory
+# "round trip" i.e. that loading and then dumping them leads to
+# identical content.
+
+load_lib rtl-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_RTLFLAGS
+if ![info exists DEFAULT_RTLFLAGS] then {
+    set DEFAULT_RTLFLAGS ""
+    # -fdump-tree-rtl-raw
+}
+
+# FIXME
+
+proc verify-roundtrip { input_file output_file } {
+    verbose "rtl-dg-test:" 3
+    verbose "  input_file: $input_file" 3
+    verbose "  output_file: $output_file" 3
+    # Use "diff" from DejaGnu's utils.exp
+    set diff_result [diff $input_file $output_file]
+    if { $diff_result == 1 } then {
+	pass "$input_file and $output_file are identical"
+    } else {
+	if { $diff_result == -1 } then {
+	    fail "$input_file and $output_file are non-identical"
+	} else {
+	    fail "problem comparing $input_file with $output_file"
+	}
+    }
+}
+
+# Override the default implementation:
+
+proc rtl-dg-test { prog do_what extra_tool_flags } {
+    verbose "rtl-dg-test:" 3
+    verbose "  prog: $prog" 3
+    verbose "  do_what: $do_what" 3
+    verbose "  extra_tool_flags: $extra_tool_flags" 3
+    # TODO: better output_file name
+    set output_file /tmp/FIXME-roundtrip.rtl
+    set options \
+	"$extra_tool_flags -froundtrip=$output_file"
+    verbose "options=$options" 3
+
+    set result [gcc-dg-test-1 rtl_target_compile $prog $do_what $options]
+    verify-roundtrip $prog $output_file
+    return $result
+}
+
+
+# Initialize `dg'.
+dg-init
+
+# Gather a list of all tests, with the exception of those in directories
+# that are handled specially.
+set tests [lsort [find $srcdir/$subdir *.rtl]]
+
+verbose "tests: $tests" 1
+
+# Main loop.
+dg-runtest $tests "" $DEFAULT_RTLFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/rtl.dg/roundtrip/test-loop.cleaned.rtl b/gcc/testsuite/rtl.dg/roundtrip/test-loop.cleaned.rtl
new file mode 100644
index 0000000..2ea3fdc
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/roundtrip/test-loop.cleaned.rtl
@@ -0,0 +1,75 @@
+(note 1 0 6 (nil) NOTE_INSN_DELETED)
+(note 6 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+(insn 2 6 3 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])
+        (reg:SI 5 di [ i ])) ../../src/test-loop.c:2 -1
+     (nil))
+(insn 3 2 4 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32])
+        (reg:SI 4 si [ j ])) ../../src/test-loop.c:2 -1
+     (nil))
+(insn 4 3 5 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
+        (reg:SI 1 dx [ k ])) ../../src/test-loop.c:2 -1
+     (nil))
+(note 5 4 8 2 NOTE_INSN_FUNCTION_BEG)
+(insn 8 5 9 2 (set (reg:SI 89)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])) ../../src/test-loop.c:3 -1
+     (nil))
+(insn 9 8 10 2 (set (reg:CCGC 17 flags)
+        (compare:CCGC (reg:SI 89)
+            (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32]))) ../../src/test-loop.c:3 -1
+     (nil))
+(jump_insn 10 9 11 2 (set (pc)
+        (if_then_else (ge (reg:CCGC 17 flags)
+                (const_int 0 [0]))
+            (label_ref 16)
+            (pc))) ../../src/test-loop.c:3 -1
+     (nil)
+ -> 16)
+(note 11 10 12 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
+(insn 12 11 13 4 (set (reg:SI 90)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:4 -1
+     (nil))
+(insn 13 12 14 4 (parallel [
+            (set (reg:SI 87 [ _1 ])
+                (plus:SI (reg:SI 90)
+                    (const_int 4 [0x4])))
+            (clobber (reg:CC 17 flags))
+        ]) ../../src/test-loop.c:4 -1
+     (expr_list:REG_EQUAL (plus:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
+            (const_int 4 [0x4]))
+        (nil)))
+(jump_insn 14 13 15 4 (set (pc)
+        (label_ref 20)) ../../src/test-loop.c:4 -1
+     (nil)
+ -> 20)
+(barrier 15 14 16)
+(code_label 16 15 17 5 2 (nil) [1 uses])
+(note 17 16 18 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
+(insn 18 17 19 5 (set (reg:SI 91)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:6 -1
+     (nil))
+(insn 19 18 20 5 (parallel [
+            (set (reg:SI 87 [ _1 ])
+                (neg:SI (reg:SI 91)))
+            (clobber (reg:CC 17 flags))
+        ]) ../../src/test-loop.c:6 -1
+     (expr_list:REG_EQUAL (neg:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32]))
+        (nil)))
+(code_label 20 19 21 6 3 (nil) [1 uses])
+(note 21 20 22 6 [bb 6] NOTE_INSN_BASIC_BLOCK)
+(insn 22 21 26 6 (set (reg:SI 88 [ <retval> ])
+        (reg:SI 87 [ _1 ])) -1
+     (nil))
+(insn 26 22 27 6 (set (reg/i:SI 0 ax)
+        (reg:SI 88 [ <retval> ])) ../../src/test-loop.c:7 -1
+     (nil))
+(insn 27 26 0 6 (use (reg/i:SI 0 ax)) ../../src/test-loop.c:7 -1
+     (nil))
diff --git a/gcc/testsuite/rtl.dg/rtl.exp b/gcc/testsuite/rtl.dg/rtl.exp
new file mode 100644
index 0000000..ae0165f
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/rtl.exp
@@ -0,0 +1,43 @@
+#   Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib rtl-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_RTLFLAGS
+if ![info exists DEFAULT_RTLFLAGS] then {
+    set DEFAULT_RTLFLAGS ""
+    # -fdump-tree-rtl-raw
+}
+
+# Initialize `dg'.
+dg-init
+
+# Gather a list of all tests, with the exception of those in directories
+# that are handled specially.
+set tests [lsort [find $srcdir/$subdir *.rtl]]
+set tests [prune $tests $srcdir/$subdir/roundtrip/*]
+
+verbose "tests: $tests" 1
+
+# Main loop.
+dg-runtest $tests "" $DEFAULT_RTLFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/rtl.dg/test-loop.cleaned.rtl b/gcc/testsuite/rtl.dg/test-loop.cleaned.rtl
new file mode 100644
index 0000000..2ea3fdc
--- /dev/null
+++ b/gcc/testsuite/rtl.dg/test-loop.cleaned.rtl
@@ -0,0 +1,75 @@
+(note 1 0 6 (nil) NOTE_INSN_DELETED)
+(note 6 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+(insn 2 6 3 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])
+        (reg:SI 5 di [ i ])) ../../src/test-loop.c:2 -1
+     (nil))
+(insn 3 2 4 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32])
+        (reg:SI 4 si [ j ])) ../../src/test-loop.c:2 -1
+     (nil))
+(insn 4 3 5 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
+        (reg:SI 1 dx [ k ])) ../../src/test-loop.c:2 -1
+     (nil))
+(note 5 4 8 2 NOTE_INSN_FUNCTION_BEG)
+(insn 8 5 9 2 (set (reg:SI 89)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])) ../../src/test-loop.c:3 -1
+     (nil))
+(insn 9 8 10 2 (set (reg:CCGC 17 flags)
+        (compare:CCGC (reg:SI 89)
+            (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32]))) ../../src/test-loop.c:3 -1
+     (nil))
+(jump_insn 10 9 11 2 (set (pc)
+        (if_then_else (ge (reg:CCGC 17 flags)
+                (const_int 0 [0]))
+            (label_ref 16)
+            (pc))) ../../src/test-loop.c:3 -1
+     (nil)
+ -> 16)
+(note 11 10 12 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
+(insn 12 11 13 4 (set (reg:SI 90)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:4 -1
+     (nil))
+(insn 13 12 14 4 (parallel [
+            (set (reg:SI 87 [ _1 ])
+                (plus:SI (reg:SI 90)
+                    (const_int 4 [0x4])))
+            (clobber (reg:CC 17 flags))
+        ]) ../../src/test-loop.c:4 -1
+     (expr_list:REG_EQUAL (plus:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
+            (const_int 4 [0x4]))
+        (nil)))
+(jump_insn 14 13 15 4 (set (pc)
+        (label_ref 20)) ../../src/test-loop.c:4 -1
+     (nil)
+ -> 20)
+(barrier 15 14 16)
+(code_label 16 15 17 5 2 (nil) [1 uses])
+(note 17 16 18 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
+(insn 18 17 19 5 (set (reg:SI 91)
+        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:6 -1
+     (nil))
+(insn 19 18 20 5 (parallel [
+            (set (reg:SI 87 [ _1 ])
+                (neg:SI (reg:SI 91)))
+            (clobber (reg:CC 17 flags))
+        ]) ../../src/test-loop.c:6 -1
+     (expr_list:REG_EQUAL (neg:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
+                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32]))
+        (nil)))
+(code_label 20 19 21 6 3 (nil) [1 uses])
+(note 21 20 22 6 [bb 6] NOTE_INSN_BASIC_BLOCK)
+(insn 22 21 26 6 (set (reg:SI 88 [ <retval> ])
+        (reg:SI 87 [ _1 ])) -1
+     (nil))
+(insn 26 22 27 6 (set (reg/i:SI 0 ax)
+        (reg:SI 88 [ <retval> ])) ../../src/test-loop.c:7 -1
+     (nil))
+(insn 27 26 0 6 (use (reg/i:SI 0 ax)) ../../src/test-loop.c:7 -1
+     (nil))
diff --git a/test-loop.cleaned.rtl b/test-loop.cleaned.rtl
deleted file mode 100644
index 2ea3fdc..0000000
--- a/test-loop.cleaned.rtl
+++ /dev/null
@@ -1,75 +0,0 @@
-(note 1 0 6 (nil) NOTE_INSN_DELETED)
-(note 6 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
-(insn 2 6 3 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])
-        (reg:SI 5 di [ i ])) ../../src/test-loop.c:2 -1
-     (nil))
-(insn 3 2 4 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32])
-        (reg:SI 4 si [ j ])) ../../src/test-loop.c:2 -1
-     (nil))
-(insn 4 3 5 2 (set (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
-        (reg:SI 1 dx [ k ])) ../../src/test-loop.c:2 -1
-     (nil))
-(note 5 4 8 2 NOTE_INSN_FUNCTION_BEG)
-(insn 8 5 9 2 (set (reg:SI 89)
-        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -4 [0xfffffffffffffffc])) [1 i+0 S4 A32])) ../../src/test-loop.c:3 -1
-     (nil))
-(insn 9 8 10 2 (set (reg:CCGC 17 flags)
-        (compare:CCGC (reg:SI 89)
-            (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                    (const_int -8 [0xfffffffffffffff8])) [1 j+0 S4 A32]))) ../../src/test-loop.c:3 -1
-     (nil))
-(jump_insn 10 9 11 2 (set (pc)
-        (if_then_else (ge (reg:CCGC 17 flags)
-                (const_int 0 [0]))
-            (label_ref 16)
-            (pc))) ../../src/test-loop.c:3 -1
-     (nil)
- -> 16)
-(note 11 10 12 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
-(insn 12 11 13 4 (set (reg:SI 90)
-        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:4 -1
-     (nil))
-(insn 13 12 14 4 (parallel [
-            (set (reg:SI 87 [ _1 ])
-                (plus:SI (reg:SI 90)
-                    (const_int 4 [0x4])))
-            (clobber (reg:CC 17 flags))
-        ]) ../../src/test-loop.c:4 -1
-     (expr_list:REG_EQUAL (plus:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])
-            (const_int 4 [0x4]))
-        (nil)))
-(jump_insn 14 13 15 4 (set (pc)
-        (label_ref 20)) ../../src/test-loop.c:4 -1
-     (nil)
- -> 20)
-(barrier 15 14 16)
-(code_label 16 15 17 5 2 (nil) [1 uses])
-(note 17 16 18 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
-(insn 18 17 19 5 (set (reg:SI 91)
-        (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32])) ../../src/test-loop.c:6 -1
-     (nil))
-(insn 19 18 20 5 (parallel [
-            (set (reg:SI 87 [ _1 ])
-                (neg:SI (reg:SI 91)))
-            (clobber (reg:CC 17 flags))
-        ]) ../../src/test-loop.c:6 -1
-     (expr_list:REG_EQUAL (neg:SI (mem/c:SI (plus:DI (reg/f:DI 82 virtual-stack-vars)
-                    (const_int -12 [0xfffffffffffffff4])) [1 k+0 S4 A32]))
-        (nil)))
-(code_label 20 19 21 6 3 (nil) [1 uses])
-(note 21 20 22 6 [bb 6] NOTE_INSN_BASIC_BLOCK)
-(insn 22 21 26 6 (set (reg:SI 88 [ <retval> ])
-        (reg:SI 87 [ _1 ])) -1
-     (nil))
-(insn 26 22 27 6 (set (reg/i:SI 0 ax)
-        (reg:SI 88 [ <retval> ])) ../../src/test-loop.c:7 -1
-     (nil))
-(insn 27 26 0 6 (use (reg/i:SI 0 ax)) ../../src/test-loop.c:7 -1
-     (nil))
-- 
1.8.5.3

