aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-23 08:37:16 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-23 08:37:16 +0000
commitb8eae306cf3077a5c8e5df631a1e838bb6b94a07 (patch)
tree6619fc5a54a03f8b79142fb660586e6d1ffbca31
parent9b7a9e9af5e272daa5ae37a25eaa84f59b10a6d5 (diff)
PR target/49069
* config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand instead of cmpdi_operand for first comparison operand. Don't assert that comparison operands aren't both constants. * gcc.dg/pr49069.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195398 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/arm/arm.md12
-rw-r--r--gcc/fortran/ChangeLog3
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/pr49069.c15
5 files changed, 32 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 245302af2cf..df62323ca42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/49069
+ * config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand
+ instead of cmpdi_operand for first comparison operand.
+ Don't assert that comparison operands aren't both constants.
+
2013-01-22 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/install.texi (Downloading the Source): Update references to
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 22f2218dd0c..1bc21890b7e 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -7030,16 +7030,12 @@
(define_expand "cbranchdi4"
[(set (pc) (if_then_else
(match_operator 0 "expandable_comparison_operator"
- [(match_operand:DI 1 "cmpdi_operand" "")
+ [(match_operand:DI 1 "s_register_operand" "")
(match_operand:DI 2 "cmpdi_operand" "")])
(label_ref (match_operand 3 "" ""))
(pc)))]
"TARGET_32BIT"
"{
- /* We should not have two constants. */
- gcc_assert (GET_MODE (operands[1]) == DImode
- || GET_MODE (operands[2]) == DImode);
-
if (!arm_validize_comparison (&operands[0], &operands[1], &operands[2]))
FAIL;
emit_jump_insn (gen_cbranch_cc (operands[0], operands[1], operands[2],
@@ -7955,14 +7951,10 @@
(define_expand "cstoredi4"
[(set (match_operand:SI 0 "s_register_operand" "")
(match_operator:SI 1 "expandable_comparison_operator"
- [(match_operand:DI 2 "cmpdi_operand" "")
+ [(match_operand:DI 2 "s_register_operand" "")
(match_operand:DI 3 "cmpdi_operand" "")]))]
"TARGET_32BIT"
"{
- /* We should not have two constants. */
- gcc_assert (GET_MODE (operands[2]) == DImode
- || GET_MODE (operands[3]) == DImode);
-
if (!arm_validize_comparison (&operands[1],
&operands[2],
&operands[3]))
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 126536b31c6..144da72020b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,7 +1,8 @@
2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55919
- * gfortran.dg/include_8.f90: New test.
+ * scanner.c (add_path_to_list): Copy path to temporary and strip
+ trailing directory separators before calling stat().
2013-01-17 Richard Biener <rguenther@suse.de>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6ed2b3e8904..3b212630d8b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/49069
+ * gcc.dg/pr49069.c: New test.
+
2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55944
@@ -27,8 +32,7 @@
2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55919
- * add_path_to_list: Copy path to temporary and strip
- trailing directory separators before calling stat().
+ * gfortran.dg/include_8.f90: New test.
2013-01-21 Uros Bizjak <ubizjak@gmail.com>
diff --git a/gcc/testsuite/gcc.dg/pr49069.c b/gcc/testsuite/gcc.dg/pr49069.c
new file mode 100644
index 00000000000..f0fe1f2f080
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr49069.c
@@ -0,0 +1,15 @@
+/* PR target/49069 */
+/* { dg-do compile } */
+/* { dg-options "-Os -fno-tree-forwprop -Wno-div-by-zero" } */
+
+int a;
+const unsigned long long b[1] = { 1ULL };
+extern void bar (int);
+
+void
+foo (void)
+{
+ for (a = 0; a == 1; a = 2)
+ ;
+ bar (b[0] == (a == 0 ? a : a / 0));
+}