]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/42113 (Internal Compiler error with -O3, breaking commit known)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 23 Nov 2009 21:27:30 +0000 (22:27 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 23 Nov 2009 21:27:30 +0000 (22:27 +0100)
PR target/42113
* config/alpha/alpha.md (*cmp_sadd_si): Change mode
of scratch register to SImode.
(*cmp_sadd_sidi): Ditto.
(*cmp_ssub_si): Ditto.
(*cmp_ssub_sidi): Ditto.

testsuite/ChangeLog:

PR target/42113
* gcc.target/alpha/pr42113.c: New test.

From-SVN: r154465

gcc/ChangeLog
gcc/config/alpha/alpha.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/alpha/pr42113.c [new file with mode: 0644]

index 6b8bb8da5e76c4c4b3fe88b2c66a163b491bb140..ddced7de0373e60d619db211df7c0e5f5211d3f5 100644 (file)
@@ -1,3 +1,12 @@
+2009-11-23  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/42113
+       * config/alpha/alpha.md (*cmp_sadd_si): Change mode
+       of scratch register to SImode.
+       (*cmp_sadd_sidi): Ditto.
+       (*cmp_ssub_si): Ditto.
+       (*cmp_ssub_sidi): Ditto.
+
 2009-11-17  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu.c (get_pic_reg): Use LAST_ARG_REGNUM as PIC
index 831a6983b66990532bb8cf3b9f94a7f35a0b27cc..72a8f2f2685ea9208e137b053324924917239c9e 100644 (file)
                 (match_dup 4)))]
 {
   if (can_create_pseudo_p ())
-    operands[5] = gen_reg_rtx (DImode);
+    operands[5] = gen_reg_rtx (SImode);
   else if (reg_overlap_mentioned_p (operands[5], operands[4]))
     operands[5] = operands[0];
 })
                                 (match_dup 4))))]
 {
   if (can_create_pseudo_p ())
-    operands[5] = gen_reg_rtx (DImode);
+    operands[5] = gen_reg_rtx (SImode);
   else if (reg_overlap_mentioned_p (operands[5], operands[4]))
-    operands[5] = operands[0];
+    operands[5] = gen_lowpart (SImode, operands[0]);
 })
 
 (define_insn_and_split "*cmp_ssub_di"
                 (match_dup 4)))]
 {
   if (can_create_pseudo_p ())
-    operands[5] = gen_reg_rtx (DImode);
+    operands[5] = gen_reg_rtx (SImode);
   else if (reg_overlap_mentioned_p (operands[5], operands[4]))
     operands[5] = operands[0];
 })
                                  (match_dup 4))))]
 {
   if (can_create_pseudo_p ())
-    operands[5] = gen_reg_rtx (DImode);
+    operands[5] = gen_reg_rtx (SImode);
   else if (reg_overlap_mentioned_p (operands[5], operands[4]))
-    operands[5] = operands[0];
+    operands[5] = gen_lowpart (SImode, operands[0]);
 })
 \f
 ;; Here are the CALL and unconditional branch insns.  Calls on NT and OSF
index 6a7b77ad0b1506636d9bc8b3b1d70f05e02a1a34..787834528210251183f48928d85b4a7efbb32642 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-23  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/42113
+       * gcc.target/alpha/pr42113.c: New test.
+
 2009-11-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/42090
diff --git a/gcc/testsuite/gcc.target/alpha/pr42113.c b/gcc/testsuite/gcc.target/alpha/pr42113.c
new file mode 100644 (file)
index 0000000..228c14a
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo (int a, int b)
+{
+  int bar = a * sizeof (int);
+
+  if (b)
+    bar += sizeof (int);
+
+  return bar;
+}