aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-10-06 13:12:50 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2011-10-06 13:12:50 +0000
commit16340e8601a250e5024d999e05a192b992b8475d (patch)
treed2af828d2a380976aca4b6c4bc6bde6de8cf0f94
parent4da6de81bcebc40d78a79d3c83c1960e6fc7d1d8 (diff)
downloadgcc-16340e8601a250e5024d999e05a192b992b8475d.zip
gcc-16340e8601a250e5024d999e05a192b992b8475d.tar.gz
gcc-16340e8601a250e5024d999e05a192b992b8475d.tar.bz2
re PR target/49049 (ICE in copyprop_hardreg_forward_1, at regcprop.c:767)
PR target/49049 * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative. * gcc.c-torture/compile/pr49049.c: New test. From-SVN: r179607
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.md15
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr49049.c28
4 files changed, 44 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c54eaf..2747f2b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-06 Bernd Schmidt <bernds@codesourcery.com>
+
+ PR target/49049
+ * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
+
2011-10-06 Ulrich Weigand <ulrich.weigand@linaro.org>
PR target/50305
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index baa7eb4..a78ba88 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -1213,27 +1213,24 @@
; ??? Check Thumb-2 split length
(define_insn_and_split "*arm_subsi3_insn"
- [(set (match_operand:SI 0 "s_register_operand" "=r,r,rk,r,r")
- (minus:SI (match_operand:SI 1 "reg_or_int_operand" "rI,r,k,?n,r")
- (match_operand:SI 2 "reg_or_int_operand" "r,rI,r, r,?n")))]
+ [(set (match_operand:SI 0 "s_register_operand" "=r,r,rk,r")
+ (minus:SI (match_operand:SI 1 "reg_or_int_operand" "rI,r,k,?n")
+ (match_operand:SI 2 "reg_or_int_operand" "r,rI,r, r")))]
"TARGET_32BIT"
"@
rsb%?\\t%0, %2, %1
sub%?\\t%0, %1, %2
sub%?\\t%0, %1, %2
- #
#"
- "&& ((GET_CODE (operands[1]) == CONST_INT
- && !const_ok_for_arm (INTVAL (operands[1])))
- || (GET_CODE (operands[2]) == CONST_INT
- && !const_ok_for_arm (INTVAL (operands[2]))))"
+ "&& (GET_CODE (operands[1]) == CONST_INT
+ && !const_ok_for_arm (INTVAL (operands[1])))"
[(clobber (const_int 0))]
"
arm_split_constant (MINUS, SImode, curr_insn,
INTVAL (operands[1]), operands[0], operands[2], 0);
DONE;
"
- [(set_attr "length" "4,4,4,16,16")
+ [(set_attr "length" "4,4,4,16")
(set_attr "predicable" "yes")]
)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 27f7746..b5ad3a4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-06 Bernd Schmidt <bernds@codesourcery.com>
+
+ PR target/49049
+ * gcc.c-torture/compile/pr49049.c: New test.
+
2011-10-06 Ulrich Weigand <ulrich.weigand@linaro.org>
PR target/50305
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49049.c b/gcc/testsuite/gcc.c-torture/compile/pr49049.c
new file mode 100644
index 0000000..a24b2a4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49049.c
@@ -0,0 +1,28 @@
+__extension__ typedef unsigned long long int uint64_t;
+
+static int
+sub (int a, int b)
+{
+ return a - b;
+}
+
+static uint64_t
+add (uint64_t a, uint64_t b)
+{
+ return a + b;
+}
+
+int *ptr;
+
+int
+foo (uint64_t arg1, int *arg2)
+{
+ int j;
+ for (; j < 1; j++)
+ {
+ *arg2 |= sub ( sub (sub (j || 1 ^ 0x1, 1), arg1 < 0x1 <=
+ sub (1, *ptr & j)),
+ (sub ( j != 1 || sub (j && j, 1) >= 0,
+ add (!j > arg1, 0x35DLL))));
+ }
+}