From 32cd58d86c50922b8c2589be5839443cd6c8e90b Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 11 Apr 2016 11:07:14 -0400 Subject: [PATCH 55/91] FIXME: start consolidating singletons --- gcc/read-rtl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index 442adc3..9a591aa 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -1793,6 +1793,17 @@ read_nested_rtx (void) require_char_ws (')'); +#ifndef GENERATOR_FILE + /* When running in the RTL frontend, we must consolidate some + rtx so that we use singletons where singletons are expected + (e.g. we don't want multiple "(const_int 0 [0])" rtx, since + these are tested via pointer equality against const0_rtx. */ + if (return_rtx) + if (GET_CODE (return_rtx) == CONST_INT) + if (INTVAL (return_rtx) == 0) + return const0_rtx; +#endif /* #ifndef GENERATOR_FILE */ + return return_rtx; } -- 1.8.5.3