summaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-22 08:24:01 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-22 08:24:01 +0000
commit417eb4fd69d4088cb2b289447359f07409757d05 (patch)
tree95ae2b7b6b9c76277353fb75bf90fdfb702956b6 /gcc/config/s390
parentb56a60c7c6bf79f0bd0fad93ace8866d9554b4e6 (diff)
downloadgcc-417eb4fd69d4088cb2b289447359f07409757d05.tar.gz
S/390: PR68015 Fix ICE in s390_emit_compare
gcc/ChangeLog: 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com> PR target/68015 * config/s390/s390.md (mov<mode>cc): Emit compare only if we don't already have a comparison result. gcc/testsuite/ChangeLog: 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com> PR target/68015 * gcc.target/s390/pr68015.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 18224592881..ea65c746fca 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -6108,8 +6108,13 @@
(match_operand:GPR 2 "nonimmediate_operand" "")
(match_operand:GPR 3 "nonimmediate_operand" "")))]
"TARGET_Z196"
- "operands[1] = s390_emit_compare (GET_CODE (operands[1]),
- XEXP (operands[1], 0), XEXP (operands[1], 1));")
+{
+ /* Emit the comparison insn in case we do not already have a comparison result. */
+ if (!s390_comparison (operands[1], VOIDmode))
+ operands[1] = s390_emit_compare (GET_CODE (operands[1]),
+ XEXP (operands[1], 0),
+ XEXP (operands[1], 1));
+})
; locr, loc, stoc, locgr, locg, stocg
(define_insn_and_split "*mov<mode>cc"