summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-30 16:19:11 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-30 16:19:11 +0000
commit6fa987837c0861b7a44ae427629f5a5920acd3b9 (patch)
tree5176e675ace86f9c1b331ce84ab33709cfe7e130 /gcc/cse.c
parente26bf699f36d3cea8c05039404e98280bddc389d (diff)
downloadgcc-6fa987837c0861b7a44ae427629f5a5920acd3b9.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20846 138bc75d-0d04-0410-961f-82ee72b054a4
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 868b7de3398..bd2aa567d23 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;