aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-06-30 09:19:11 -0700
committerRichard Henderson <rth@gcc.gnu.org>1998-06-30 09:19:11 -0700
commitcff48d8f76463f870df7340253373b7c84b52f7f (patch)
tree5176e675ace86f9c1b331ce84ab33709cfe7e130 /gcc/cse.c
parent84001dd054fd6514c6104b829320733db1ec7cd7 (diff)
downloadgcc-cff48d8f76463f870df7340253373b7c84b52f7f.zip
gcc-cff48d8f76463f870df7340253373b7c84b52f7f.tar.gz
gcc-cff48d8f76463f870df7340253373b7c84b52f7f.tar.bz2
rtl.def (CONSTANT_P_RTX): New.
* rtl.def (CONSTANT_P_RTX): New. * rtl.h (CONSTANT_P): Recognize it. * cse.c (fold_rtx): Eliminate it. * expr.c (can_handle_constant_p): New variable. (init_expr_once): Initialize it. (expand_builtin): Generate CONSTANT_P_RTX if the expression is not immediately recognizable as a constant. From-SVN: r20846
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 868b7de..bd2aa56 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5715,6 +5715,12 @@ fold_rtx (x, insn)
const_arg1 ? const_arg1 : folded_arg1,
const_arg2 ? const_arg2 : XEXP (x, 2));
break;
+
+ case 'x':
+ /* Always eliminate CONSTANT_P_RTX at this stage. */
+ if (code == CONSTANT_P_RTX)
+ return (const_arg0 ? const1_rtx : const0_rtx);
+ break;
}
return new ? new : x;