aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2009-09-29 22:21:27 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2009-09-29 22:21:27 +0000
commitcd17b213b03e996a12f51d06dca7f2e206bb76b0 (patch)
treedd2aeee209e1e15eaa776d22e870148aed2fc0db
parente7ada00d3383d76e31b43ce59b246afd4eda811a (diff)
downloadgcc-cd17b213b03e996a12f51d06dca7f2e206bb76b0.zip
gcc-cd17b213b03e996a12f51d06dca7f2e206bb76b0.tar.gz
gcc-cd17b213b03e996a12f51d06dca7f2e206bb76b0.tar.bz2
re PR target/41365 (gcc.dg/vect/vect-cond-[123].c abort due to bad code generation at -O1 and above)
2009-09-29 Steve Ellcey <sje@cup.hp.com> Alexander Monakov <amonakov@ispras.ru> PR target/41365 * config/ia64/predicates.md (not_postinc_destination_operand): New. (not_postinc_memory_operand): New. (not_postinc_move_operand): New. * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement. (*cmovsi_internal): Ditto. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> From-SVN: r152306
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/ia64/ia64.md19
-rw-r--r--gcc/config/ia64/predicates.md12
3 files changed, 32 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 197cec1..7439cef 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-29 Steve Ellcey <sje@cup.hp.com>
+ Alexander Monakov <amonakov@ispras.ru>
+
+ PR target/41365
+ * config/ia64/predicates.md (not_postinc_destination_operand): New.
+ (not_postinc_memory_operand): New.
+ (not_postinc_move_operand): New.
+ * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
+ (*cmovsi_internal): Ditto.
+
2009-09-29 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index f9c6de2d..4ed427f 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -4083,16 +4083,16 @@
;;
(define_insn "*cmovdi_internal"
- [(set (match_operand:DI 0 "destination_operand"
+ [(set (match_operand:DI 0 "not_postinc_destination_operand"
"= r, r, r, r, r, r, r, r, r, r, m, Q, *f,*b,*d*e")
(if_then_else:DI
(match_operator 4 "predicate_operator"
[(match_operand:BI 1 "register_operand"
"c,c,c,c,c,c,c,c,c,c,c,c,c,c,c")
(const_int 0)])
- (match_operand:DI 2 "move_operand"
+ (match_operand:DI 2 "not_postinc_move_operand"
"rim, *f, *b,*d*e,rim,rim, rim,*f,*b,*d*e,rO,*f,rOQ,rO, rK")
- (match_operand:DI 3 "move_operand"
+ (match_operand:DI 3 "not_postinc_move_operand"
"rim,rim,rim, rim, *f, *b,*d*e,*f,*b,*d*e,rO,*f,rOQ,rO, rK")))]
"ia64_move_ok (operands[0], operands[2])
&& ia64_move_ok (operands[0], operands[3])"
@@ -4100,13 +4100,13 @@
[(set_attr "predicable" "no")])
(define_split
- [(set (match_operand 0 "destination_operand" "")
+ [(set (match_operand 0 "not_postinc_destination_operand" "")
(if_then_else
(match_operator 4 "predicate_operator"
[(match_operand:BI 1 "register_operand" "")
(const_int 0)])
- (match_operand 2 "move_operand" "")
- (match_operand 3 "move_operand" "")))]
+ (match_operand 2 "not_postinc_move_operand" "")
+ (match_operand 3 "not_postinc_move_operand" "")))]
"reload_completed"
[(const_int 0)]
{
@@ -4188,14 +4188,15 @@
;;
(define_insn "*cmovsi_internal"
- [(set (match_operand:SI 0 "destination_operand" "=r,m,*f,r,m,*f,r,m,*f")
+ [(set (match_operand:SI 0 "not_postinc_destination_operand"
+ "=r,m,*f,r,m,*f,r,m,*f")
(if_then_else:SI
(match_operator 4 "predicate_operator"
[(match_operand:BI 1 "register_operand" "c,c,c,c,c,c,c,c,c")
(const_int 0)])
- (match_operand:SI 2 "move_operand"
+ (match_operand:SI 2 "not_postinc_move_operand"
"0,0,0,rim*f,rO,rO,rim*f,rO,rO")
- (match_operand:SI 3 "move_operand"
+ (match_operand:SI 3 "not_postinc_move_operand"
"rim*f,rO,rO,0,0,0,rim*f,rO,rO")))]
"ia64_move_ok (operands[0], operands[2])
&& ia64_move_ok (operands[0], operands[3])"
diff --git a/gcc/config/ia64/predicates.md b/gcc/config/ia64/predicates.md
index 1503a05..2d0af6f 100644
--- a/gcc/config/ia64/predicates.md
+++ b/gcc/config/ia64/predicates.md
@@ -281,6 +281,12 @@
|| GET_CODE (XEXP (op, 0)) != POST_MODIFY
|| GET_CODE (XEXP (XEXP (XEXP (op, 0), 1), 1)) != REG")))
+;; Like destination_operand, but don't allow any post-increments.
+(define_predicate "not_postinc_destination_operand"
+ (and (match_operand 0 "nonimmediate_operand")
+ (match_test "GET_CODE (op) != MEM
+ || GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
+
;; Like memory_operand, but don't allow post-increments.
(define_predicate "not_postinc_memory_operand"
(and (match_operand 0 "memory_operand")
@@ -332,6 +338,12 @@
}
})
+;; Like move_operand but don't allow post-increments.
+(define_predicate "not_postinc_move_operand"
+ (and (match_operand 0 "move_operand")
+ (match_test "GET_CODE (op) != MEM
+ || GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
+
;; True if OP is a register operand that is (or could be) a GR reg.
(define_predicate "gr_register_operand"
(match_operand 0 "register_operand")