diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1995-05-02 17:41:19 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1995-05-02 17:41:19 +0000 |
commit | 91e66235060bd49c9af50928f325f815889e4eee (patch) | |
tree | 7379c06ed29b6c928cc6b98414653ef97b5ca480 /gcc/expmed.c | |
parent | 473fa8ccce8bb50c9ff8c591520cd8aadc7691d1 (diff) | |
download | gcc-91e66235060bd49c9af50928f325f815889e4eee.tar.gz |
If expensive optimizations, use different pseudos when making store flag insns.
From-SVN: r9562
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index fc0a0ef7046..5fcfe64f0c2 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4038,7 +4038,11 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) if (last) delete_insns_since (last); - subtarget = target_mode == mode ? target : 0; + /* If expensive optimizations, use different pseudo registers for each + insn, instead of reusing the same pseudo. This leads to better CSE, + but slows down the compiler, since there are more pseudos */ + subtarget = (!flag_expensive_optimizations + && (target_mode == mode)) ? target : NULL_RTX; /* If we reached here, we can't do this with a scc insn. However, there are some comparisons that can be done directly. For example, if @@ -4183,15 +4187,22 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) if (tem && normalizep) tem = expand_shift (RSHIFT_EXPR, mode, tem, size_int (GET_MODE_BITSIZE (mode) - 1), - tem, normalizep == 1); + subtarget, normalizep == 1); - if (tem && GET_MODE (tem) != target_mode) + if (tem) { - convert_move (target, tem, 0); - tem = target; + if (GET_MODE (tem) != target_mode) + { + convert_move (target, tem, 0); + tem = target; + } + else if (!subtarget) + { + emit_move_insn (target, tem); + tem = target; + } } - - if (tem == 0) + else delete_insns_since (last); return tem; |