[PATCH] Sparc64 fix
Jakub Jelinek
jakub@redhat.com
Tue Apr 4 09:38:00 GMT 2000
Hi!
Following patch fixes an ICE on sparc64 which became apparent with the
sibcall changes: eventhough patterns like snedi_zero etc. have proper
early clobbers because they really cannot work on the same register, gcc
might decide to split them earlier (and then die in update_flow_info).
This patch makes sure the split is done only if the REGNOs are different, if
they are for some reason the same, it won't be splitted until reload which
then reloads them correctly and then the split can happen just fine.
Ok to commit?
2000-04-04 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md (snedi_zero+1, neg_snedi_zero+1,
snedi_zero_trunc+1, seqdi_zero+1, neg_seqdi_zero+1,
seqdi_zero_trunc+1): Allow splits only if registers are
different.
--- gcc/config/sparc/sparc.md.jj Tue Apr 4 12:08:35 2000
+++ gcc/config/sparc/sparc.md Tue Apr 4 17:39:46 2000
@@ -1187,7 +1187,7 @@
[(set (match_operand:DI 0 "register_operand" "")
(ne:DI (match_operand:DI 1 "register_operand" "")
(const_int 0)))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1)
(const_int 0))
@@ -1208,7 +1208,7 @@
[(set (match_operand:DI 0 "register_operand" "")
(neg:DI (ne:DI (match_operand:DI 1 "register_operand" "")
(const_int 0))))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1)
(const_int 0))
@@ -1229,7 +1229,7 @@
[(set (match_operand:SI 0 "register_operand" "")
(ne:SI (match_operand:DI 1 "register_operand" "")
(const_int 0)))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:SI (ne:DI (match_dup 1)
(const_int 0))
@@ -1314,7 +1314,7 @@
[(set (match_operand:DI 0 "register_operand" "")
(eq:DI (match_operand:DI 1 "register_operand" "")
(const_int 0)))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1)
(const_int 0))
@@ -1335,7 +1335,7 @@
[(set (match_operand:DI 0 "register_operand" "")
(neg:DI (eq:DI (match_operand:DI 1 "register_operand" "")
(const_int 0))))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1)
(const_int 0))
@@ -1356,7 +1356,7 @@
[(set (match_operand:SI 0 "register_operand" "")
(eq:SI (match_operand:DI 1 "register_operand" "")
(const_int 0)))]
- "TARGET_ARCH64"
+ "TARGET_ARCH64 && REGNO(operands[0]) != REGNO(operands[1])"
[(set (match_dup 0) (const_int 0))
(set (match_dup 0) (if_then_else:SI (eq:DI (match_dup 1)
(const_int 0))
Jakub
More information about the Gcc-patches
mailing list