aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2005-12-16 22:19:09 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-12-16 22:19:09 +0000
commitebd8b60da18203d983ab65a5f3d20c70bf8f6348 (patch)
tree27cbf67bba2b87ad3d3700394b9e945821f96440
parentf3a1a6532fbce3ce51c71b07d5141c1f5f48c176 (diff)
downloadgcc-ebd8b60da18203d983ab65a5f3d20c70bf8f6348.zip
gcc-ebd8b60da18203d983ab65a5f3d20c70bf8f6348.tar.gz
gcc-ebd8b60da18203d983ab65a5f3d20c70bf8f6348.tar.bz2
re PR rtl-optimization/23837 (Wrong code with REG_NO_CONFLICT notes (caused by combine))
PR rtl-optimization/23837 * optabs.c (expand_binop): For a multi-word rotate, never emit a REG_NO_CONFLICT block. From-SVN: r108690
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/optabs.c22
2 files changed, 13 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fd9c62c..4f36c02 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-16 Steven Bosscher <stevenb@suse.de>
+
+ PR rtl-optimization/23837
+ * optabs.c (expand_binop): For a multi-word rotate, never emit
+ a REG_NO_CONFLICT block.
+
2005-12-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/25457
diff --git a/gcc/optabs.c b/gcc/optabs.c
index a72028e..45bfbbd 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -1420,7 +1420,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
&& ashl_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing
&& lshr_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{
- rtx insns, equiv_value;
+ rtx insns;
rtx into_target, outof_target;
rtx into_input, outof_input;
rtx inter;
@@ -1520,20 +1520,12 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
if (inter != 0)
{
- if (binoptab->code != UNKNOWN)
- equiv_value = gen_rtx_fmt_ee (binoptab->code, mode, op0, op1);
- else
- equiv_value = 0;
-
- /* We can't make this a no conflict block if this is a word swap,
- because the word swap case fails if the input and output values
- are in the same register. */
- if (shift_count != BITS_PER_WORD)
- emit_no_conflict_block (insns, target, op0, op1, equiv_value);
- else
- emit_insn (insns);
-
-
+ /* One may be tempted to wrap the insns in a REG_NO_CONFLICT
+ block to help the register allocator a bit. But a multi-word
+ rotate will need all the input bits when setting the output
+ bits, so there clearly is a conflict between the input and
+ output registers. So we can't use a no-conflict block here. */
+ emit_insn (insns);
return target;
}
}