[PATCH] Start adding selftests for print_rtx

Bernd Schmidt bschmidt@redhat.com
Fri Oct 21 10:04:00 GMT 2016


On 10/21/2016 02:36 AM, David Malcolm wrote:
> +  /* Test dumping of hard regs.  This is inherently target-specific due
> +     to the name.  */
> +#ifdef I386_OPTS_H
> +  ASSERT_RTL_DUMP_EQ ("(reg:SI ax)", gen_raw_REG (SImode, 0));
> +#endif

Generally putting in target dependencies like this isn't something we 
like to do. The patch is OK without this part, and we can revisit this, 
but maybe there wants to be a target hook for running target-specific 
selftests.

> +  ASSERT_RTL_DUMP_EQ ("(cjump_insn (set (pc)\n"
> +		      "        (label_ref 0))\n"
> +		      "     (nil))\n",
> +		      jump_insn);
>  }

I do wonder about the (nil)s and whether we can eliminate them.


Bernd



More information about the Gcc-patches mailing list