This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] simplify-rtx.c: start adding selftests
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 03 Jul 2016 18:12:06 +0100
- Subject: Re: [PATCH] simplify-rtx.c: start adding selftests
- Authentication-results: sourceware.org; auth=none
- References: <1467417936-26679-1-git-send-email-dmalcolm at redhat dot com>
David Malcolm <email@example.com> writes:
> This patch starts adding selftests to simplify-rtx.c, to ensure that
> RTL expressions are simplified as we expect.
> It adds a new ASSERT_RTX_EQ macro that checks for pointer equality
> of two rtx values. If they're non-equal, it aborts, printing both
This might be a bit confusing when more tests are added, since pointer
equality is only useful in certain specific cases (e.g. when you know
you're dealing with CONST_INTs or pseudo registers). How about making
ASSERT_RTX_EQ check for rtx_equal_p equality and have something like
ASSERT_RTX_PTR_EQ for cases where pointer equality really is needed?
Also, how about using LAST_VIRTUAL_REGISTER + 1 as the base for
register numbers? DImode might not be valid for register 0 on