diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-11-07 15:19:17 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-11-07 15:19:17 +0000 |
commit | b5fbe7164833774eabba67ecd47b3658d8e2c395 (patch) | |
tree | 2a53d93e01ff3266941b8cd229c9472180d2f20d /gcc/rtl-tests.c | |
parent | 061ee39672f0086c2a9ab6e38f0747d0b9ad18a8 (diff) | |
download | gcc-b5fbe7164833774eabba67ecd47b3658d8e2c395.zip gcc-b5fbe7164833774eabba67ecd47b3658d8e2c395.tar.gz gcc-b5fbe7164833774eabba67ecd47b3658d8e2c395.tar.bz2 |
rtx_writer: avoid printing trailing default values
gcc/ChangeLog:
* print-rtl.c (rtx_writer::operand_has_default_value_p): New
method.
(rtx_writer::print_rtx): In compact mode, omit trailing operands
that have the default values.
* print-rtl.h (rtx_writer::operand_has_default_value_p): New
method.
* rtl-tests.c (selftest::test_dumping_insns): Remove empty
label string from expected dump.
(seltest::test_uncond_jump): Remove trailing "(nil)" for REG_NOTES
from expected dump.
From-SVN: r241908
Diffstat (limited to 'gcc/rtl-tests.c')
-rw-r--r-- | gcc/rtl-tests.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/rtl-tests.c b/gcc/rtl-tests.c index cf5239f..228226b 100644 --- a/gcc/rtl-tests.c +++ b/gcc/rtl-tests.c @@ -122,7 +122,7 @@ test_dumping_insns () /* Labels. */ rtx_insn *label = gen_label_rtx (); CODE_LABEL_NUMBER (label) = 42; - ASSERT_RTL_DUMP_EQ ("(clabel 0 42 \"\")\n", label); + ASSERT_RTL_DUMP_EQ ("(clabel 0 42)\n", label); LABEL_NAME (label)= "some_label"; ASSERT_RTL_DUMP_EQ ("(clabel 0 42 (\"some_label\"))\n", label); @@ -176,8 +176,7 @@ test_uncond_jump () ASSERT_TRUE (control_flow_insn_p (jump_insn)); ASSERT_RTL_DUMP_EQ ("(cjump_insn 1 (set (pc)\n" - " (label_ref 0))\n" - " (nil))\n", + " (label_ref 0)))\n", jump_insn); } |