aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-07-14 08:15:00 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-07-14 08:15:00 -0400
commite6a125a009ce35346ccc1afa40d9dd3714cef210 (patch)
tree2638450cee95afb1f7c4541a06762e9984ecee37 /gcc
parentb7d9c4185decb56898befa10117145d6f2a024f2 (diff)
downloadgcc-e6a125a009ce35346ccc1afa40d9dd3714cef210.zip
gcc-e6a125a009ce35346ccc1afa40d9dd3714cef210.tar.gz
gcc-e6a125a009ce35346ccc1afa40d9dd3714cef210.tar.bz2
(cse_insn): Ifdef out code that pre-truncates src_folded.
From-SVN: r10127
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index bcc5ede..1b302f5 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6317,6 +6317,13 @@ cse_insn (insn, in_libcall_block)
simplified result, which may not necessarily be valid. */
src_folded = fold_rtx (src, insn);
+#if 0
+ /* ??? This caused bad code to be generated for the m68k port with -O2.
+ Suppose src is (CONST_INT -1), and that after truncation src_folded
+ is (CONST_INT 3). Suppose src_folded is then used for src_const.
+ At the end we will add src and src_const to the same equivalence
+ class. We now have 3 and -1 on the same equivalence class. This
+ causes later instructions to be mis-optimized. */
/* If storing a constant in a bitfield, pre-truncate the constant
so we will be able to record it later. */
if (GET_CODE (SET_DEST (sets[i].rtl)) == ZERO_EXTRACT
@@ -6332,6 +6339,7 @@ cse_insn (insn, in_libcall_block)
= GEN_INT (INTVAL (src) & (((HOST_WIDE_INT) 1
<< INTVAL (width)) - 1));
}
+#endif
/* Compute SRC's hash code, and also notice if it
should not be recorded at all. In that case,