summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cselib.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f71941ddd5..335fa39dc50 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * cselib.c (cselib_record_sets): Use correct mode for IF_THEN_ELSE.
+
2008-05-19 Xinliang David Li <davidxl@google.com>
* tree-ssa-dce.c: Revert patches of 2008-05-17 and 2008-05-18.
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 5d490941df8..f45803e8e4d 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1600,7 +1600,7 @@ cselib_record_sets (rtx insn)
{
rtx src = sets[i].src;
if (cond)
- src = gen_rtx_IF_THEN_ELSE (GET_MODE (src), cond, src, dest);
+ src = gen_rtx_IF_THEN_ELSE (GET_MODE (dest), cond, src, dest);
sets[i].src_elt = cselib_lookup (src, GET_MODE (dest), 1);
if (MEM_P (dest))
sets[i].dest_addr_elt = cselib_lookup (XEXP (dest, 0), Pmode, 1);